I have some confusion between Builder Function and Widget Class , I would to know why , when I should use one of them ,
like in this code , this code not the problem but I will write to explain more .
import 'package:flutter/material.dart';
class AOneScreen extends StatelessWidget {
//Builder Function
Widget builderFunction(){
return Container(
// any code .....
);
}
@override
Widget build(BuildContext context) {
return Scaffold(
body: Container(
child: Column(
children: <Widget>[
builderFunction(), ///use builder function
WidgetBuilder() /// use Widget Class
],
),
),
);
}
}
/////Widget Class
class WidgetBuilder extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Container(
/// any code ....
);
}
}