Skip to content

Commit

Permalink
chore(flutter_dynamic_form): update styles for material 3 compat
Browse files Browse the repository at this point in the history
  • Loading branch information
felangel committed Nov 24, 2023
1 parent 4ebb0c4 commit c12c3e5
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
2 changes: 1 addition & 1 deletion examples/flutter_dynamic_form/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ subprojects {
project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
tasks.register("clean", Delete) {
delete rootProject.buildDir
}
24 changes: 15 additions & 9 deletions examples/flutter_dynamic_form/lib/new_car/view/new_car_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<NewCarRepository>(),
Expand All @@ -25,14 +24,21 @@ class NewCarForm extends StatelessWidget {

@override
Widget build(BuildContext context) {
return const Column(
crossAxisAlignment: CrossAxisAlignment.stretch,
children: <Widget>[
_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: <Widget>[
_BrandDropdownButton(),
_ModelDropdownButton(),
_YearDropdownButton(),
_FormSubmitButton(),
],
),
),
);
}
}
Expand Down

0 comments on commit c12c3e5

Please sign in to comment.