Skip to content

Commit

Permalink
Update compatibility (#20)
Browse files Browse the repository at this point in the history
* Update compatibility

* Fix demo dependencies
  • Loading branch information
creativecreatorormaybenot committed May 24, 2021
1 parent be55c38 commit a2cc524
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 14 deletions.
5 changes: 5 additions & 0 deletions math_keyboard/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
## 0.1.1+1

* Fixed `numpadBackspace` breaking change.
* Addressed `ThemeData.accentColor` deprecations.

## 0.1.1

* Unary minus support when converting to an expression.
Expand Down
5 changes: 2 additions & 3 deletions math_keyboard/lib/src/widgets/math_field.dart
Original file line number Diff line number Diff line change
Expand Up @@ -424,8 +424,7 @@ class _MathFieldState extends State<MathField> with TickerProviderStateMixin {
KeyEventResult? _handleLogicalKey(
LogicalKeyboardKey logicalKey, List<KeyboardButtonConfig> configs) {
// Check logical, fixed keyboard bindings (like backspace and arrow keys).
if ((logicalKey == LogicalKeyboardKey.backspace ||
logicalKey == LogicalKeyboardKey.numpadBackspace) &&
if (logicalKey == LogicalKeyboardKey.backspace &&
configs.any((element) => element is DeleteButtonConfig)) {
_controller.goBack(deleteMode: true);
return KeyEventResult.handled;
Expand Down Expand Up @@ -561,7 +560,7 @@ class _FieldPreview extends StatelessWidget {
cursorColor: Color.lerp(
_getDisabledCursorColor(Theme.of(context)),
Theme.of(context).textSelectionTheme.cursorColor ??
Theme.of(context).accentColor,
Theme.of(context).colorScheme.secondary,
cursorOpacity,
),
)
Expand Down
2 changes: 1 addition & 1 deletion math_keyboard/lib/src/widgets/math_keyboard.dart
Original file line number Diff line number Diff line change
Expand Up @@ -443,7 +443,7 @@ class _BasicButton extends StatelessWidget {
result = KeyboardButton(
onTap: onTap,
color: highlightLevel > 1
? Theme.of(context).accentColor
? Theme.of(context).colorScheme.secondary
: highlightLevel == 1
? Colors.grey[900]
: null,
Expand Down
6 changes: 3 additions & 3 deletions math_keyboard/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: math_keyboard
description: >-2
Math expression editing using an on-screen software keyboard or physical keyboard input in a
typeset input field in Flutter.
version: 0.1.1
version: 0.1.1+1
homepage: https://github.com/simpleclub/math_keyboard/tree/main/math_keyboard

environment:
Expand All @@ -15,8 +15,8 @@ dependencies:
flutter_localizations:
sdk: flutter

flutter_math_fork: ^0.3.0+2
holding_gesture: ^1.0.0
flutter_math_fork: ^0.3.3
holding_gesture: ^1.1.0
intl: ^0.17.0
math_expressions: ^2.1.0
petitparser: ^4.0.2
Expand Down
12 changes: 6 additions & 6 deletions math_keyboard_demo/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -38,14 +38,14 @@ packages:
name: flutter_math_fork
url: "https://pub.dartlang.org"
source: hosted
version: "0.3.0+2"
version: "0.3.3"
flutter_svg:
dependency: "direct main"
description:
name: flutter_svg
url: "https://pub.dartlang.org"
source: hosted
version: "0.21.0-nullsafety.0"
version: "0.22.0"
flutter_web_plugins:
dependency: transitive
description: flutter
Expand All @@ -57,7 +57,7 @@ packages:
name: holding_gesture
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.0"
version: "1.1.0"
intl:
dependency: transitive
description:
Expand Down Expand Up @@ -92,7 +92,7 @@ packages:
path: "../math_keyboard"
relative: true
source: path
version: "0.0.1+2"
version: "0.1.1+1"
meta:
dependency: transitive
description:
Expand Down Expand Up @@ -120,14 +120,14 @@ packages:
name: path_drawing
url: "https://pub.dartlang.org"
source: hosted
version: "0.5.0-nullsafety.0"
version: "0.5.1"
path_parsing:
dependency: transitive
description:
name: path_parsing
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.0-nullsafety.0"
version: "0.2.1"
pedantic:
dependency: "direct dev"
description:
Expand Down
2 changes: 1 addition & 1 deletion math_keyboard_demo/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dependencies:
flutter:
sdk: flutter

flutter_svg: ^0.21.0-nullsafety.0
flutter_svg: ^0.22.0

math_keyboard:
path: ../math_keyboard
Expand Down

0 comments on commit a2cc524

Please sign in to comment.