diff --git a/math_keyboard/lib/src/foundation/keyboard_button.dart b/math_keyboard/lib/src/foundation/keyboard_button.dart index a79c901..882d722 100644 --- a/math_keyboard/lib/src/foundation/keyboard_button.dart +++ b/math_keyboard/lib/src/foundation/keyboard_button.dart @@ -211,7 +211,18 @@ final functionKeyboard = [ ), ], [ - const PageButtonConfig(flex: 3), + // const PageButtonConfig(flex: 3), + const BasicKeyboardButtonConfig( + label: '[', + value: '[', + highlighted: true, + keyboardCharacters: ['['], + ),const BasicKeyboardButtonConfig( + label: ']', + value: ']', + highlighted: true, + keyboardCharacters: [']'], + ), const BasicKeyboardButtonConfig( label: '(', value: '(', @@ -224,9 +235,9 @@ final functionKeyboard = [ highlighted: true, keyboardCharacters: [')'], ), - PreviousButtonConfig(), - NextButtonConfig(), - DeleteButtonConfig(), + // PreviousButtonConfig(), + // NextButtonConfig(), + // DeleteButtonConfig(), ], ]; @@ -270,11 +281,11 @@ final standardKeyboard = [ DeleteButtonConfig(), ], [ - const PageButtonConfig(), - _digitButtons[0], + // const PageButtonConfig(), PreviousButtonConfig(), + _digitButtons[0], NextButtonConfig(), - SubmitButtonConfig(), + SubmitButtonConfig(flex: 4), ], ]; diff --git a/math_keyboard/lib/src/widgets/math_keyboard.dart b/math_keyboard/lib/src/widgets/math_keyboard.dart index ccf16fa..eb07461 100644 --- a/math_keyboard/lib/src/widgets/math_keyboard.dart +++ b/math_keyboard/lib/src/widgets/math_keyboard.dart @@ -140,7 +140,7 @@ class MathKeyboard extends StatelessWidget { color: Color(0xFFCCCCCC)) ] ), - padding: EdgeInsets.only(top: 16.0), + padding: EdgeInsets.only(top: 16.0, left: 16.0, right: 16.0), child: _KeyboardBody( insetsState: insetsState, slideAnimation: @@ -150,7 +150,7 @@ class MathKeyboard extends StatelessWidget { child: Center( child: ConstrainedBox( constraints: const BoxConstraints( - maxWidth: 5e2, + maxWidth: double.infinity, ), child: Column( children: [ @@ -167,25 +167,33 @@ class MathKeyboard extends StatelessWidget { padding: const EdgeInsets.only( top: 4, ), - child: _Buttons( - controller: controller, - page1: type == MathKeyboardType.numberOnly - ? numberKeyboard - : type == - MathKeyboardType.coachOnKeyboard1 - ? standardKeyboard - : standardKeyboard, - page2: type == MathKeyboardType.numberOnly - ? null - : type == - MathKeyboardType.coachOnKeyboard1 - ? coachOnKeyboard1 - : functionKeyboard, - onSubmit: onSubmit, - buttonColor: buttonColor, - highlightColor: highlightColor, - iconColor: iconColor, - submitColor: submitColor, + child: Row( + children: [ + Flexible( + child: _Buttons( + controller: controller, + page1: functionKeyboard, + page2: functionKeyboard, + onSubmit: onSubmit, + buttonColor: buttonColor, + highlightColor: highlightColor, + iconColor: iconColor, + submitColor: submitColor, + ), + ), + Flexible( + child: _Buttons( + controller: controller, + page1: standardKeyboard, + page2: coachOnKeyboard1, + onSubmit: onSubmit, + buttonColor: buttonColor, + highlightColor: highlightColor, + iconColor: iconColor, + submitColor: submitColor, + ), + ), + ], ), ), ], diff --git a/math_keyboard_demo/lib/widgets/editable_mixed_text_field.dart b/math_keyboard_demo/lib/widgets/editable_mixed_text_field.dart index 5377d59..cc6d739 100644 --- a/math_keyboard_demo/lib/widgets/editable_mixed_text_field.dart +++ b/math_keyboard_demo/lib/widgets/editable_mixed_text_field.dart @@ -230,7 +230,7 @@ String rightSide = ''; focusNode: mathFocusNode, autofocus: true, controller: mathController, - variables: const ['x', 'y', 'z', '='], + variables: const ['a', 'b', 'c', 'x', 'y', 'z', '='], decoration: InputDecoration( border: OutlineInputBorder(), labelText: '수식을 입력하세요',