diff --git a/.github/workflows/flutterfmt.yml b/.github/workflows/flutterfmt.yml index f7d9229..cfab73a 100644 --- a/.github/workflows/flutterfmt.yml +++ b/.github/workflows/flutterfmt.yml @@ -18,7 +18,7 @@ jobs: - name: Install flutter uses: subosito/flutter-action@v1 with: - flutter-version: '2.0.5' + flutter-version: '2.8.0' - name: Check out code uses: actions/checkout@v2 diff --git a/lib/components/IPField.dart b/lib/components/IPField.dart index 995cbf5..4c01e2e 100644 --- a/lib/components/IPField.dart +++ b/lib/components/IPField.dart @@ -3,6 +3,7 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/SpecialTextField.dart'; + import '../services/utils.dart'; class IPField extends StatelessWidget { @@ -47,7 +48,7 @@ class IPField extends StatelessWidget { controller: controller, onChanged: onChanged, maxLength: ipOnly ? 15 : null, - maxLengthEnforced: ipOnly ? true : false, + maxLengthEnforcement: ipOnly ? MaxLengthEnforcement.enforced : MaxLengthEnforcement.none, inputFormatters: ipOnly ? [IPTextInputFormatter()] : [FilteringTextInputFormatter.allow(RegExp(r'[^\s]+'))], textInputAction: this.textInputAction, placeholder: help, diff --git a/lib/components/PlatformTextFormField.dart b/lib/components/PlatformTextFormField.dart index 78ded7b..b842b3f 100644 --- a/lib/components/PlatformTextFormField.dart +++ b/lib/components/PlatformTextFormField.dart @@ -20,7 +20,7 @@ class PlatformTextFormField extends FormField { autofocus, maxLines = 1, maxLength, - maxLengthEnforced, + maxLengthEnforcement, onChanged, keyboardAppearance, minLines, @@ -64,7 +64,7 @@ class PlatformTextFormField extends FormField { autofocus: autofocus, maxLines: maxLines, maxLength: maxLength, - maxLengthEnforced: maxLengthEnforced, + maxLengthEnforcement: maxLengthEnforcement, onChanged: onChangedHandler, keyboardAppearance: keyboardAppearance, minLines: minLines, diff --git a/lib/components/SpecialSelectableText.dart b/lib/components/SpecialSelectableText.dart index ce86555..e3c0072 100644 --- a/lib/components/SpecialSelectableText.dart +++ b/lib/components/SpecialSelectableText.dart @@ -5,12 +5,12 @@ // @dart = 2.8 import 'package:flutter/cupertino.dart'; +import 'package:flutter/foundation.dart'; +import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/rendering.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; -import 'package:flutter/foundation.dart'; -import 'package:flutter/gestures.dart'; //TODO: please let us delete this file @@ -31,7 +31,7 @@ class _TextSpanEditingController extends TextEditingController { final TextSpan _textSpan; @override - TextSpan buildTextSpan({TextStyle style, bool withComposing}) { + TextSpan buildTextSpan({BuildContext context, TextStyle style, bool withComposing}) { // This does not care about composing. return TextSpan( style: style, diff --git a/lib/components/SpecialTextField.dart b/lib/components/SpecialTextField.dart index 69be0bc..571e756 100644 --- a/lib/components/SpecialTextField.dart +++ b/lib/components/SpecialTextField.dart @@ -18,7 +18,7 @@ class SpecialTextField extends StatefulWidget { this.minLines, this.maxLines, this.maxLength, - this.maxLengthEnforced, + this.maxLengthEnforcement, this.style, this.keyboardType, this.textInputAction, @@ -41,7 +41,7 @@ class SpecialTextField extends StatefulWidget { final int minLines; final int maxLines; final int maxLength; - final bool maxLengthEnforced; + final MaxLengthEnforcement maxLengthEnforcement; final Widget suffix; final TextStyle style; final TextInputType keyboardType; @@ -92,7 +92,7 @@ class _SpecialTextFieldState extends State { minLines: widget.minLines, maxLines: widget.maxLines, maxLength: widget.maxLength, - maxLengthEnforced: widget.maxLengthEnforced, + maxLengthEnforcement: widget.maxLengthEnforcement, keyboardType: widget.keyboardType, keyboardAppearance: widget.keyboardAppearance, textInputAction: widget.textInputAction, diff --git a/lib/components/config/ConfigHeader.dart b/lib/components/config/ConfigHeader.dart index 3a51fb4..7e572de 100644 --- a/lib/components/config/ConfigHeader.dart +++ b/lib/components/config/ConfigHeader.dart @@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; TextStyle basicTextStyle(BuildContext context) => - Platform.isIOS ? CupertinoTheme.of(context).textTheme.textStyle : Theme.of(context).textTheme.subhead; + Platform.isIOS ? CupertinoTheme.of(context).textTheme.textStyle : Theme.of(context).textTheme.subtitle1; const double _headerFontSize = 13.0; diff --git a/nebula/go.sum b/nebula/go.sum index b5cd6ea..57e3ad2 100644 --- a/nebula/go.sum +++ b/nebula/go.sum @@ -270,6 +270,7 @@ golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRu golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= +golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028/go.mod h1:E/iHnbuqvinMTCcRqshq8CkpyQDoeVncDDYHnLhea+o= golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc= golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY= diff --git a/pubspec.lock b/pubspec.lock index d42a2d3..add365e 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -7,7 +7,7 @@ packages: name: async url: "https://pub.dartlang.org" source: hosted - version: "2.5.0" + version: "2.8.2" barcode_scan: dependency: "direct main" description: @@ -28,14 +28,14 @@ packages: name: characters url: "https://pub.dartlang.org" source: hosted - version: "1.1.0" + version: "1.2.0" charcode: dependency: transitive description: name: charcode url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.3.1" clock: dependency: transitive description: @@ -63,7 +63,7 @@ packages: name: cupertino_icons url: "https://pub.dartlang.org" source: hosted - version: "1.0.2" + version: "1.0.4" fake_async: dependency: transitive description: @@ -77,21 +77,21 @@ packages: name: ffi url: "https://pub.dartlang.org" source: hosted - version: "1.0.0" + version: "1.1.2" file: dependency: transitive description: name: file url: "https://pub.dartlang.org" source: hosted - version: "6.1.0" + version: "6.1.2" file_picker: dependency: "direct main" description: name: file_picker url: "https://pub.dartlang.org" source: hosted - version: "3.0.2+2" + version: "3.0.4" fixnum: dependency: transitive description: @@ -110,14 +110,14 @@ packages: name: flutter_platform_widgets url: "https://pub.dartlang.org" source: hosted - version: "1.2.0" + version: "1.12.1" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.5" flutter_test: dependency: "direct dev" description: flutter @@ -141,21 +141,21 @@ packages: name: matcher url: "https://pub.dartlang.org" source: hosted - version: "0.12.10" + version: "0.12.11" meta: dependency: transitive description: name: meta url: "https://pub.dartlang.org" source: hosted - version: "1.3.0" + version: "1.7.0" package_info: dependency: "direct main" description: name: package_info url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" path: dependency: transitive description: @@ -169,56 +169,70 @@ packages: name: path_provider url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.8" + path_provider_android: + dependency: transitive + description: + name: path_provider_android + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.11" + path_provider_ios: + dependency: transitive + description: + name: path_provider_ios + url: "https://pub.dartlang.org" + source: hosted + version: "2.0.7" path_provider_linux: dependency: transitive description: name: path_provider_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.4" path_provider_macos: dependency: transitive description: name: path_provider_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.4" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.2" path_provider_windows: dependency: transitive description: name: path_provider_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.1" + version: "2.0.4" platform: dependency: transitive description: name: platform url: "https://pub.dartlang.org" source: hosted - version: "3.0.0" + version: "3.1.0" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.1.2" process: dependency: transitive description: name: process url: "https://pub.dartlang.org" source: hosted - version: "4.2.1" + version: "4.2.4" protobuf: dependency: transitive description: @@ -232,7 +246,7 @@ packages: name: pull_to_refresh url: "https://pub.dartlang.org" source: hosted - version: "1.6.5" + version: "2.0.0" sky_engine: dependency: transitive description: flutter @@ -244,7 +258,7 @@ packages: name: source_span url: "https://pub.dartlang.org" source: hosted - version: "1.8.0" + version: "1.8.1" stack_trace: dependency: transitive description: @@ -279,7 +293,7 @@ packages: name: test_api url: "https://pub.dartlang.org" source: hosted - version: "0.2.19" + version: "0.4.3" typed_data: dependency: transitive description: @@ -293,63 +307,77 @@ packages: name: url_launcher url: "https://pub.dartlang.org" source: hosted - version: "6.0.6" + version: "6.0.17" + url_launcher_android: + dependency: transitive + description: + name: url_launcher_android + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.13" + url_launcher_ios: + dependency: transitive + description: + name: url_launcher_ios + url: "https://pub.dartlang.org" + source: hosted + version: "6.0.13" url_launcher_linux: dependency: transitive description: name: url_launcher_linux url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" url_launcher_macos: dependency: transitive description: name: url_launcher_macos url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface url: "https://pub.dartlang.org" source: hosted - version: "2.0.3" + version: "2.0.5" url_launcher_web: dependency: transitive description: name: url_launcher_web url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.5" url_launcher_windows: dependency: transitive description: name: url_launcher_windows url: "https://pub.dartlang.org" source: hosted - version: "2.0.0" + version: "2.0.2" uuid: dependency: "direct main" description: name: uuid url: "https://pub.dartlang.org" source: hosted - version: "3.0.4" + version: "3.0.5" vector_math: dependency: transitive description: name: vector_math url: "https://pub.dartlang.org" source: hosted - version: "2.1.0" + version: "2.1.1" win32: dependency: transitive description: name: win32 url: "https://pub.dartlang.org" source: hosted - version: "2.0.5" + version: "2.3.3" xdg_directories: dependency: transitive description: @@ -358,5 +386,5 @@ packages: source: hosted version: "0.2.0" sdks: - dart: ">=2.12.0 <3.0.0" - flutter: ">=2.0.0" + dart: ">=2.14.0 <3.0.0" + flutter: ">=2.5.0" diff --git a/pubspec.yaml b/pubspec.yaml index fab9338..ad9058b 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -30,7 +30,7 @@ dependencies: uuid: ^3.0.4 package_info: ^2.0.0 url_launcher: ^6.0.6 - pull_to_refresh: ^1.6.5 + pull_to_refresh: ^2.0.0 dev_dependencies: flutter_test: