diff --git a/assets/images/logo.webp b/assets/images/logo.webp new file mode 100644 index 0000000..6c6b832 Binary files /dev/null and b/assets/images/logo.webp differ diff --git a/assets/images/wallpaper.webp b/assets/images/wallpaper.webp new file mode 100644 index 0000000..b676d04 Binary files /dev/null and b/assets/images/wallpaper.webp differ diff --git a/lib/components/dlForm.dart b/lib/components/dlForm.dart index b1c95a3..2ac92aa 100644 --- a/lib/components/dlForm.dart +++ b/lib/components/dlForm.dart @@ -12,17 +12,35 @@ class DlForm extends StatelessWidget { Widget build(BuildContext context) { return ChangeNotifierProvider( create: (context) => DlFormState(), - child: Form( - child: Column( - children: [ - Row(children: [ - UrlTextField(), - DropdownFormat(), - SubmitButton(), - ]), - DebugDlFormState(), - ], - ))); + child: Form(child: LayoutBuilder( + builder: (BuildContext context, BoxConstraints constraints) { + debugPrint('Max width: ${constraints.maxWidth}'); + if (constraints.maxWidth < 720) { + return Column( + children: [ + Row(children: [ + UrlTextField(), + ]), + Row(children: [ + Expanded(flex: 1, child: DropdownFormat()), + Expanded(flex: 1, child: SubmitButton()), + ]), + DebugDlFormState(), + ], + ); + } else { + return Column( + children: [ + Row(children: [ + UrlTextField(), + DropdownFormat(), + SubmitButton(), + ]), + DebugDlFormState(), + ], + ); + } + }))); } } diff --git a/lib/screens/home.dart b/lib/screens/home.dart index 20accc0..94e7ac4 100644 --- a/lib/screens/home.dart +++ b/lib/screens/home.dart @@ -9,20 +9,20 @@ class Home extends StatelessWidget { @override Widget build(BuildContext context) { return Scaffold( - appBar: AppBar( - title: Text('home').tr(), - ), - body: Center( - child: Column( - children: [ - SizedBox(height: 10), - Text('home_intro').tr(), - SizedBox(height: 10), - Padding( - padding: EdgeInsets.symmetric(horizontal: 20), child: DlForm()) - ], + appBar: AppBar( + title: Text('home').tr(), ), - ), - ); + body: Center( + child: Column( + children: [ + SizedBox(height: 10), + Text('home_intro').tr(), + SizedBox(height: 10), + Padding( + padding: EdgeInsets.symmetric(horizontal: 20), + child: DlForm()) + ], + ), + )); } }