From c12c3e51adfd3f48597d58ad908bed0623d7a31e Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Fri, 24 Nov 2023 00:04:02 -0600 Subject: [PATCH] chore(flutter_dynamic_form): update styles for material 3 compat --- .../flutter_dynamic_form/android/build.gradle | 2 +- .../lib/new_car/view/new_car_page.dart | 24 ++++++++++++------- 2 files changed, 16 insertions(+), 10 deletions(-) diff --git a/examples/flutter_dynamic_form/android/build.gradle b/examples/flutter_dynamic_form/android/build.gradle index 58a8c74b147..713d7f6e6d4 100644 --- a/examples/flutter_dynamic_form/android/build.gradle +++ b/examples/flutter_dynamic_form/android/build.gradle @@ -26,6 +26,6 @@ subprojects { project.evaluationDependsOn(':app') } -task clean(type: Delete) { +tasks.register("clean", Delete) { delete rootProject.buildDir } diff --git a/examples/flutter_dynamic_form/lib/new_car/view/new_car_page.dart b/examples/flutter_dynamic_form/lib/new_car/view/new_car_page.dart index 69707f95e64..65a7b8cccd8 100644 --- a/examples/flutter_dynamic_form/lib/new_car/view/new_car_page.dart +++ b/examples/flutter_dynamic_form/lib/new_car/view/new_car_page.dart @@ -9,7 +9,6 @@ class NewCarPage extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar(title: const Text('Flutter Dynamic Form')), body: BlocProvider( create: (_) => NewCarBloc( newCarRepository: context.read(), @@ -25,14 +24,21 @@ class NewCarForm extends StatelessWidget { @override Widget build(BuildContext context) { - return const Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - _BrandDropdownButton(), - _ModelDropdownButton(), - _YearDropdownButton(), - _FormSubmitButton(), - ], + return const Align( + alignment: Alignment(0, -3 / 4), + child: Padding( + padding: EdgeInsets.all(8), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + mainAxisSize: MainAxisSize.min, + children: [ + _BrandDropdownButton(), + _ModelDropdownButton(), + _YearDropdownButton(), + _FormSubmitButton(), + ], + ), + ), ); } }