in lib/src/common.dart [207:273]
Widget build(BuildContext context) {
return MaterialApp(
debugShowCheckedModeBanner: false,
theme: ThemeData().copyWith(
platform: platform,
brightness: Brightness.dark,
sliderTheme: SliderThemeData.fromPrimaryColors(
primaryColor: primaryColor,
primaryColorLight: primaryColor,
primaryColorDark: primaryColor,
valueIndicatorTextStyle: const DefaultTextStyle.fallback().style,
),
),
home: Scaffold(
appBar: AppBar(title: const Text("Sunflower")),
drawer: Drawer(
child: ListView(
children: const [
DrawerHeader(
child: Center(
child: Text(
"Sunflower 🌻",
style: TextStyle(fontSize: 32),
),
),
),
],
)),
body: Container(
constraints: const BoxConstraints.expand(),
decoration:
BoxDecoration(border: Border.all(color: Colors.transparent)),
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.start,
children: [
Container(
decoration: BoxDecoration(
border: Border.all(color: Colors.transparent)),
child: SizedBox(
width: 400,
height: 400,
child: CustomPaint(
painter: SunflowerPainter(seedCount),
),
),
),
Text("Showing $seedCount seeds"),
ConstrainedBox(
constraints: const BoxConstraints.tightFor(width: 300),
child: Slider.adaptive(
min: 20,
max: 2000,
value: seeds,
onChanged: (newValue) {
setState(() {
seeds = newValue;
});
},
),
),
],
),
),
),
);
}