fix keyboard type
continuous-integration/drone/push Build is passing Details

pull/63/head
Lucas DELANIER 1 year ago
parent dc61eae0d4
commit d74ac5d9ec

@ -62,21 +62,7 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
} }
Future pickImage(ImageSource source) async { 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 { try {
final image = await ImagePicker().pickImage(source: source, imageQuality: 20); final image = await ImagePicker().pickImage(source: source, imageQuality: 20);
if (image == null) return; if (image == null) return;
@ -88,7 +74,6 @@ class _EditablePostComponentState extends State<EditablePostComponent> with Tick
} on PlatformException catch (e) { } on PlatformException catch (e) {
print('Failed to pick image: $e'); print('Failed to pick image: $e');
} }
}
} }

@ -35,7 +35,7 @@ class _HistoricComponentState extends State<HistoricComponent> {
builder: (context, snapshot) { builder: (context, snapshot) {
if (snapshot.hasData) { if (snapshot.hasData) {
return Container( return Container(
constraints: const BoxConstraints( maxWidth: 420), constraints: const BoxConstraints( maxWidth: 600),
child: Wrap( child: Wrap(
spacing: 14, spacing: 14,
runSpacing: 14, runSpacing: 14,

@ -78,8 +78,8 @@ class _CapsuleHistoricScreenState extends State<CapsuleHistoricScreen> {
crossAxisAlignment: CrossAxisAlignment.center, crossAxisAlignment: CrossAxisAlignment.center,
children: [ children: [
Container( Container(
padding: const EdgeInsets.only(top: 80, left: 60, right: 60), padding: const EdgeInsets.only(top: 80, left: 30, right: 30),
constraints: const BoxConstraints( maxWidth: 450), constraints: const BoxConstraints( maxWidth: 700),
child: Align( child: Align(
alignment: Alignment.center, alignment: Alignment.center,
child: Row( child: Row(
@ -131,7 +131,6 @@ class _CapsuleHistoricScreenState extends State<CapsuleHistoricScreen> {
child: SizedBox( child: SizedBox(
width: double.infinity, width: double.infinity,
child: Container( child: Container(
padding: EdgeInsets.symmetric(horizontal: 15),
child: Column( child: Column(
children: [ children: [
HistoricComponent( HistoricComponent(

@ -612,6 +612,7 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
Expanded( Expanded(
child: TextField( child: TextField(
keyboardAppearance: Brightness.dark, keyboardAppearance: Brightness.dark,
keyboardType: TextInputType.text,
controller: _textController, controller: _textController,
focusNode: myFocusNode, focusNode: myFocusNode,
onSubmitted: (value) async { onSubmitted: (value) async {
@ -626,7 +627,6 @@ class _DetailPostScreenState extends State<DetailPostScreen> {
setState(() {}); setState(() {});
}, },
cursorColor: primaryColor, cursorColor: primaryColor,
keyboardType: TextInputType.emailAddress,
style: GoogleFonts.plusJakartaSans(color: Colors.white), style: GoogleFonts.plusJakartaSans(color: Colors.white),
decoration: InputDecoration( decoration: InputDecoration(
suffixIcon: _textController.text.isEmpty suffixIcon: _textController.text.isEmpty

Loading…
Cancel
Save