Mobile UI changes

This commit is contained in:
Hillel Coren 2020-11-11 15:11:43 +02:00
parent 9c79ff5b21
commit 4a3ecdce95
1 changed files with 2 additions and 4 deletions

View File

@ -1,5 +1,6 @@
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:invoiceninja_flutter/utils/platforms.dart';
class DecoratedFormField extends StatelessWidget {
const DecoratedFormField({
@ -85,16 +86,13 @@ class DecoratedFormField extends StatelessWidget {
: TextInputAction.next),
onChanged: onChanged,
onFieldSubmitted: (value) {
print('## onFieldSubmitted');
if (onFieldSubmitted != null) {
return onFieldSubmitted(value);
} else if (keyboardType == TextInputType.multiline) {
return null;
} else if (kIsWeb && onSavePressed != null) {
print('## WEB');
} else if (kIsWeb && isDesktop(context) && onSavePressed != null) {
onSavePressed(context);
} else {
print('## FOUCY');
FocusScope.of(context).nextFocus();
}
},