From d74ac5d9eca50aa54e3de84c398f632306023977 Mon Sep 17 00:00:00 2001 From: ludelanier Date: Sun, 26 Nov 2023 12:45:03 +0100 Subject: [PATCH] fix keyboard type --- .../lib/components/editable_post_component.dart | 17 +---------------- .../lib/components/historic_component.dart | 2 +- .../lib/screens/capsule_historic_screen.dart | 5 ++--- .../lib/screens/detail_post_screen.dart | 2 +- 4 files changed, 5 insertions(+), 21 deletions(-) diff --git a/Sources/justMUSIC/lib/components/editable_post_component.dart b/Sources/justMUSIC/lib/components/editable_post_component.dart index 434bc7c..cec93db 100644 --- a/Sources/justMUSIC/lib/components/editable_post_component.dart +++ b/Sources/justMUSIC/lib/components/editable_post_component.dart @@ -62,21 +62,7 @@ class _EditablePostComponentState extends State with Tick } Future pickImage(ImageSource source) async { - if(kIsWeb){ - print('you are on web'); - try { - final image = await ImagePicker().pickImage(source: source, imageQuality: 20); - if (image == null) return; - final imageTemp = File(image.path); - setState(() { - this.image = imageTemp; - widget.callBackImage(imageTemp); - }); - } on PlatformException catch (e) { - print('Failed to pick image: $e'); - } - } - else{ + try { final image = await ImagePicker().pickImage(source: source, imageQuality: 20); if (image == null) return; @@ -88,7 +74,6 @@ class _EditablePostComponentState extends State with Tick } on PlatformException catch (e) { print('Failed to pick image: $e'); } - } } diff --git a/Sources/justMUSIC/lib/components/historic_component.dart b/Sources/justMUSIC/lib/components/historic_component.dart index 07f7bc3..3f99346 100644 --- a/Sources/justMUSIC/lib/components/historic_component.dart +++ b/Sources/justMUSIC/lib/components/historic_component.dart @@ -35,7 +35,7 @@ class _HistoricComponentState extends State { builder: (context, snapshot) { if (snapshot.hasData) { return Container( - constraints: const BoxConstraints( maxWidth: 420), + constraints: const BoxConstraints( maxWidth: 600), child: Wrap( spacing: 14, runSpacing: 14, diff --git a/Sources/justMUSIC/lib/screens/capsule_historic_screen.dart b/Sources/justMUSIC/lib/screens/capsule_historic_screen.dart index a29a04d..b50f908 100644 --- a/Sources/justMUSIC/lib/screens/capsule_historic_screen.dart +++ b/Sources/justMUSIC/lib/screens/capsule_historic_screen.dart @@ -78,8 +78,8 @@ class _CapsuleHistoricScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, children: [ Container( - padding: const EdgeInsets.only(top: 80, left: 60, right: 60), - constraints: const BoxConstraints( maxWidth: 450), + padding: const EdgeInsets.only(top: 80, left: 30, right: 30), + constraints: const BoxConstraints( maxWidth: 700), child: Align( alignment: Alignment.center, child: Row( @@ -131,7 +131,6 @@ class _CapsuleHistoricScreenState extends State { child: SizedBox( width: double.infinity, child: Container( - padding: EdgeInsets.symmetric(horizontal: 15), child: Column( children: [ HistoricComponent( diff --git a/Sources/justMUSIC/lib/screens/detail_post_screen.dart b/Sources/justMUSIC/lib/screens/detail_post_screen.dart index cc95607..f2bd56e 100644 --- a/Sources/justMUSIC/lib/screens/detail_post_screen.dart +++ b/Sources/justMUSIC/lib/screens/detail_post_screen.dart @@ -612,6 +612,7 @@ class _DetailPostScreenState extends State { Expanded( child: TextField( keyboardAppearance: Brightness.dark, + keyboardType: TextInputType.text, controller: _textController, focusNode: myFocusNode, onSubmitted: (value) async { @@ -626,7 +627,6 @@ class _DetailPostScreenState extends State { setState(() {}); }, cursorColor: primaryColor, - keyboardType: TextInputType.emailAddress, style: GoogleFonts.plusJakartaSans(color: Colors.white), decoration: InputDecoration( suffixIcon: _textController.text.isEmpty