diff --git a/lib/components/CIDRField.dart b/lib/components/CIDRField.dart index 24a7dc5..5a98321 100644 --- a/lib/components/CIDRField.dart +++ b/lib/components/CIDRField.dart @@ -1,7 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/SpecialTextField.dart'; import 'package:mobile_nebula/models/CIDR.dart'; import '../services/utils.dart'; diff --git a/lib/components/CIDRFormField.dart b/lib/components/CIDRFormField.dart index 2bfef29..0a18742 100644 --- a/lib/components/CIDRFormField.dart +++ b/lib/components/CIDRFormField.dart @@ -1,11 +1,10 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/CIDRField.dart'; import 'package:mobile_nebula/models/CIDR.dart'; import 'package:mobile_nebula/validators/ipValidator.dart'; class CIDRFormField extends FormField { - //TODO: onSaved, validator, autovalidate, enabled? + //TODO: onSaved, validator, auto-validate, enabled? CIDRFormField({ Key key, autoFocus = false, diff --git a/lib/components/IPAndPortField.dart b/lib/components/IPAndPortField.dart index 8dda5ce..f70a564 100644 --- a/lib/components/IPAndPortField.dart +++ b/lib/components/IPAndPortField.dart @@ -1,7 +1,5 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/SpecialTextField.dart'; import 'package:mobile_nebula/models/IPAndPort.dart'; import '../services/utils.dart'; diff --git a/lib/components/IPAndPortFormField.dart b/lib/components/IPAndPortFormField.dart index bb962dc..0171db0 100644 --- a/lib/components/IPAndPortFormField.dart +++ b/lib/components/IPAndPortFormField.dart @@ -1,5 +1,4 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/models/IPAndPort.dart'; import 'package:mobile_nebula/validators/dnsValidator.dart'; import 'package:mobile_nebula/validators/ipValidator.dart'; @@ -7,7 +6,7 @@ import 'package:mobile_nebula/validators/ipValidator.dart'; import 'IPAndPortField.dart'; class IPAndPortFormField extends FormField { - //TODO: onSaved, validator, autovalidate, enabled? + //TODO: onSaved, validator, auto-validate, enabled? IPAndPortFormField({ Key key, ipOnly = false, diff --git a/lib/components/IPField.dart b/lib/components/IPField.dart index 4c01e2e..38bc527 100644 --- a/lib/components/IPField.dart +++ b/lib/components/IPField.dart @@ -1,7 +1,5 @@ import 'package:flutter/cupertino.dart'; -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'; diff --git a/lib/components/IPFormField.dart b/lib/components/IPFormField.dart index 02cd229..8156179 100644 --- a/lib/components/IPFormField.dart +++ b/lib/components/IPFormField.dart @@ -1,6 +1,4 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/validators/dnsValidator.dart'; import 'package:mobile_nebula/validators/ipValidator.dart'; @@ -9,7 +7,7 @@ import 'IPField.dart'; //TODO: reset doesn't update the ui but clears the field class IPFormField extends FormField { - //TODO: validator, autovalidate, enabled? + //TODO: validator, auto-validate, enabled? IPFormField({ Key key, ipOnly = false, diff --git a/lib/components/PlatformTextFormField.dart b/lib/components/PlatformTextFormField.dart index b842b3f..9129f0b 100644 --- a/lib/components/PlatformTextFormField.dart +++ b/lib/components/PlatformTextFormField.dart @@ -1,12 +1,10 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/SpecialTextField.dart'; //TODO: reset doesn't update the ui but clears the field class PlatformTextFormField extends FormField { - //TODO: autovalidate, enabled? + //TODO: auto-validate, enabled? PlatformTextFormField( {Key key, widgetKey, diff --git a/lib/components/SimplePage.dart b/lib/components/SimplePage.dart index 074a5e1..3ce8a5a 100644 --- a/lib/components/SimplePage.dart +++ b/lib/components/SimplePage.dart @@ -32,7 +32,7 @@ class SimplePage extends StatelessWidget { final SimpleScrollable scrollable; final ScrollController scrollController; - /// Set this to true to force draw a scrollbar without a scroll view, this is helpful for pages with Reorderable listviews + /// Set this to true to force draw a scrollbar without a scroll view, this is helpful for pages with Reorder-able listviews /// This is set to true if you have any scrollable other than none final bool scrollbar; final Widget bottomBar; diff --git a/lib/components/SiteItem.dart b/lib/components/SiteItem.dart index 1051b1e..cf24fb8 100644 --- a/lib/components/SiteItem.dart +++ b/lib/components/SiteItem.dart @@ -1,5 +1,4 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:mobile_nebula/components/SpecialButton.dart'; import 'package:mobile_nebula/models/Site.dart'; import 'package:mobile_nebula/services/utils.dart'; diff --git a/lib/components/SpecialTextField.dart b/lib/components/SpecialTextField.dart index bfd5e02..af86a0e 100644 --- a/lib/components/SpecialTextField.dart +++ b/lib/components/SpecialTextField.dart @@ -1,6 +1,5 @@ import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; /// A normal TextField or CupertinoTextField that looks the same on all platforms @@ -76,42 +75,42 @@ class _SpecialTextFieldState extends State { @override Widget build(BuildContext context) { return PlatformTextField( - autocorrect: widget.autocorrect, - minLines: widget.minLines, - maxLines: widget.maxLines, - maxLength: widget.maxLength, - maxLengthEnforcement: widget.maxLengthEnforcement, - keyboardType: widget.keyboardType, - keyboardAppearance: widget.keyboardAppearance, - textInputAction: widget.textInputAction, - textCapitalization: widget.textCapitalization, - textAlign: widget.textAlign, - textAlignVertical: widget.textAlignVertical, - autofocus: widget.autofocus, - focusNode: widget.focusNode, - onChanged: widget.onChanged, - enabled: widget.enabled, - onSubmitted: (_) { - if (widget.nextFocusNode != null) { - FocusScope.of(context).requestFocus(widget.nextFocusNode); - } - }, - expands: widget.expands, - inputFormatters: formatters, - material: (_, __) => MaterialTextFieldData( - decoration: InputDecoration( - border: InputBorder.none, - contentPadding: EdgeInsets.zero, - isDense: true, - hintText: widget.placeholder, - counterText: '', - suffix: widget.suffix)), - cupertino: (_, __) => CupertinoTextFieldData( - decoration: BoxDecoration(), - padding: EdgeInsets.zero, - placeholder: widget.placeholder, - suffix: widget.suffix), - style: widget.style, - controller: widget.controller); + autocorrect: widget.autocorrect, + minLines: widget.minLines, + maxLines: widget.maxLines, + maxLength: widget.maxLength, + maxLengthEnforcement: widget.maxLengthEnforcement, + keyboardType: widget.keyboardType, + keyboardAppearance: widget.keyboardAppearance, + textInputAction: widget.textInputAction, + textCapitalization: widget.textCapitalization, + textAlign: widget.textAlign, + textAlignVertical: widget.textAlignVertical, + autofocus: widget.autofocus, + focusNode: widget.focusNode, + onChanged: widget.onChanged, + enabled: widget.enabled, + onSubmitted: (_) { + if (widget.nextFocusNode != null) { + FocusScope.of(context).requestFocus(widget.nextFocusNode); + } + }, + expands: widget.expands, + inputFormatters: formatters, + material: (_, __) => MaterialTextFieldData( + decoration: InputDecoration( + border: InputBorder.none, + contentPadding: EdgeInsets.zero, + isDense: true, + hintText: widget.placeholder, + counterText: '', + suffix: widget.suffix)), + cupertino: (_, __) => CupertinoTextFieldData( + decoration: BoxDecoration(), + padding: EdgeInsets.zero, + placeholder: widget.placeholder, + suffix: widget.suffix), + style: widget.style, + controller: widget.controller); } } diff --git a/lib/components/config/ConfigCheckboxItem.dart b/lib/components/config/ConfigCheckboxItem.dart index ce7bc86..17b84a6 100644 --- a/lib/components/config/ConfigCheckboxItem.dart +++ b/lib/components/config/ConfigCheckboxItem.dart @@ -1,5 +1,4 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:mobile_nebula/components/SpecialButton.dart'; import 'package:mobile_nebula/services/utils.dart'; diff --git a/lib/components/config/ConfigSection.dart b/lib/components/config/ConfigSection.dart index 6a2edc1..6568f7f 100644 --- a/lib/components/config/ConfigSection.dart +++ b/lib/components/config/ConfigSection.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:mobile_nebula/services/utils.dart'; diff --git a/lib/main.dart b/lib/main.dart index 8a298a9..c386099 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -8,7 +8,7 @@ import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/screens/MainScreen.dart'; import 'package:mobile_nebula/services/settings.dart'; -//TODO: EventChannel might be better than the streamcontroller we are using now +//TODO: EventChannel might be better than the stream controller we are using now void main() => runApp(Main()); diff --git a/lib/screens/AboutScreen.dart b/lib/screens/AboutScreen.dart index aa27a2d..45de7d0 100644 --- a/lib/screens/AboutScreen.dart +++ b/lib/screens/AboutScreen.dart @@ -1,6 +1,4 @@ -import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/config/ConfigItem.dart'; diff --git a/lib/screens/HostInfoScreen.dart b/lib/screens/HostInfoScreen.dart index df5dfdd..cc5a9c9 100644 --- a/lib/screens/HostInfoScreen.dart +++ b/lib/screens/HostInfoScreen.dart @@ -1,6 +1,5 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/config/ConfigCheckboxItem.dart'; @@ -75,18 +74,12 @@ class _HostInfoScreenState extends State { Widget _buildDetails() { return ConfigSection(children: [ ConfigItem( - label: Text('Lighthouse'), - labelWidth: 150, - content: SelectableText(widget.isLighthouse ? 'Yes' : 'No')), + label: Text('Lighthouse'), labelWidth: 150, content: SelectableText(widget.isLighthouse ? 'Yes' : 'No')), ConfigItem(label: Text('Local Index'), labelWidth: 150, content: SelectableText('${hostInfo.localIndex}')), + ConfigItem(label: Text('Remote Index'), labelWidth: 150, content: SelectableText('${hostInfo.remoteIndex}')), ConfigItem( - label: Text('Remote Index'), labelWidth: 150, content: SelectableText('${hostInfo.remoteIndex}')), - ConfigItem( - label: Text('Message Counter'), - labelWidth: 150, - content: SelectableText('${hostInfo.messageCounter}')), - ConfigItem( - label: Text('Cached Packets'), labelWidth: 150, content: SelectableText('${hostInfo.cachedPackets}')), + label: Text('Message Counter'), labelWidth: 150, content: SelectableText('${hostInfo.messageCounter}')), + ConfigItem(label: Text('Cached Packets'), labelWidth: 150, content: SelectableText('${hostInfo.cachedPackets}')), ]); } @@ -156,7 +149,7 @@ class _HostInfoScreenState extends State { padding: EdgeInsets.only(top: 50, bottom: 10, left: 10, right: 10), child: SizedBox( width: double.infinity, - child: PlatformButton( + child: PlatformElevatedButton( child: Text('Close Tunnel'), color: CupertinoColors.systemRed.resolveFrom(context), onPressed: () => Utils.confirmDelete(context, 'Close Tunnel?', () async { diff --git a/lib/screens/MainScreen.dart b/lib/screens/MainScreen.dart index 38276f6..3d1df58 100644 --- a/lib/screens/MainScreen.dart +++ b/lib/screens/MainScreen.dart @@ -6,7 +6,6 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/SiteItem.dart'; diff --git a/lib/screens/SettingsScreen.dart b/lib/screens/SettingsScreen.dart index 956bd25..010612e 100644 --- a/lib/screens/SettingsScreen.dart +++ b/lib/screens/SettingsScreen.dart @@ -1,6 +1,4 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/config/ConfigItem.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; diff --git a/lib/screens/SiteDetailScreen.dart b/lib/screens/SiteDetailScreen.dart index 2bb1784..e2f8d93 100644 --- a/lib/screens/SiteDetailScreen.dart +++ b/lib/screens/SiteDetailScreen.dart @@ -3,7 +3,6 @@ import 'dart:async'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; @@ -109,8 +108,7 @@ class _SiteDetailScreenState extends State { List items = []; site.errors.forEach((error) { items.add(ConfigItem( - labelWidth: 0, - content: Padding(padding: EdgeInsets.symmetric(vertical: 10), child: SelectableText(error)))); + labelWidth: 0, content: Padding(padding: EdgeInsets.symmetric(vertical: 10), child: SelectableText(error)))); }); return ConfigSection( @@ -235,7 +233,7 @@ class _SiteDetailScreenState extends State { padding: EdgeInsets.only(top: 50, bottom: 10, left: 10, right: 10), child: SizedBox( width: double.infinity, - child: PlatformButton( + child: PlatformElevatedButton( child: Text('Delete'), color: CupertinoColors.systemRed.resolveFrom(context), onPressed: () => Utils.confirmDelete(context, 'Delete Site?', () async { diff --git a/lib/screens/SiteLogsScreen.dart b/lib/screens/SiteLogsScreen.dart index 9712a78..648de1a 100644 --- a/lib/screens/SiteLogsScreen.dart +++ b/lib/screens/SiteLogsScreen.dart @@ -2,7 +2,6 @@ import 'dart:io'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/models/Site.dart'; diff --git a/lib/screens/SiteTunnelsScreen.dart b/lib/screens/SiteTunnelsScreen.dart index b3c3b6e..02cf1f7 100644 --- a/lib/screens/SiteTunnelsScreen.dart +++ b/lib/screens/SiteTunnelsScreen.dart @@ -1,6 +1,5 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; import 'package:mobile_nebula/components/config/ConfigSection.dart'; diff --git a/lib/screens/siteConfig/AddCertificateScreen.dart b/lib/screens/siteConfig/AddCertificateScreen.dart index 432ac08..81b37c6 100644 --- a/lib/screens/siteConfig/AddCertificateScreen.dart +++ b/lib/screens/siteConfig/AddCertificateScreen.dart @@ -4,7 +4,6 @@ import 'package:barcode_scan/barcode_scan.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/config/ConfigButtonItem.dart'; diff --git a/lib/screens/siteConfig/CAListScreen.dart b/lib/screens/siteConfig/CAListScreen.dart index 0a307c4..75b32d4 100644 --- a/lib/screens/siteConfig/CAListScreen.dart +++ b/lib/screens/siteConfig/CAListScreen.dart @@ -2,9 +2,7 @@ import 'dart:convert'; import 'package:barcode_scan/barcode_scan.dart'; import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/FormPage.dart'; import 'package:mobile_nebula/components/config/ConfigButtonItem.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; diff --git a/lib/screens/siteConfig/CertificateDetailsScreen.dart b/lib/screens/siteConfig/CertificateDetailsScreen.dart index 9f662e6..523231a 100644 --- a/lib/screens/siteConfig/CertificateDetailsScreen.dart +++ b/lib/screens/siteConfig/CertificateDetailsScreen.dart @@ -1,6 +1,5 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/FormPage.dart'; import 'package:mobile_nebula/components/config/ConfigItem.dart'; @@ -93,11 +92,9 @@ class _CertificateDetailsScreenState extends State { children: [ ConfigItem(label: Text('Valid?'), content: valid), ConfigItem( - label: Text('Created'), - content: SelectableText(certInfo.cert.details.notBefore.toLocal().toString())), + label: Text('Created'), content: SelectableText(certInfo.cert.details.notBefore.toLocal().toString())), ConfigItem( - label: Text('Expires'), - content: SelectableText(certInfo.cert.details.notAfter.toLocal().toString())), + label: Text('Expires'), content: SelectableText(certInfo.cert.details.notAfter.toLocal().toString())), ], ); } @@ -105,8 +102,7 @@ class _CertificateDetailsScreenState extends State { Widget _buildFilters() { List items = []; if (certInfo.cert.details.groups.length > 0) { - items.add( - ConfigItem(label: Text('Groups'), content: SelectableText(certInfo.cert.details.groups.join(', ')))); + items.add(ConfigItem(label: Text('Groups'), content: SelectableText(certInfo.cert.details.groups.join(', ')))); } if (certInfo.cert.details.ips.length > 0) { @@ -114,8 +110,7 @@ class _CertificateDetailsScreenState extends State { } if (certInfo.cert.details.subnets.length > 0) { - items.add( - ConfigItem(label: Text('Subnets'), content: SelectableText(certInfo.cert.details.subnets.join(', ')))); + items.add(ConfigItem(label: Text('Subnets'), content: SelectableText(certInfo.cert.details.subnets.join(', ')))); } return items.length > 0 @@ -128,8 +123,8 @@ class _CertificateDetailsScreenState extends State { children: [ ConfigItem( label: Text('Fingerprint'), - content: SelectableText(certInfo.cert.fingerprint, - style: TextStyle(fontFamily: 'RobotoMono', fontSize: 14)), + content: + SelectableText(certInfo.cert.fingerprint, style: TextStyle(fontFamily: 'RobotoMono', fontSize: 14)), crossAxisAlignment: CrossAxisAlignment.start), ConfigItem( label: Text('Public Key'), @@ -139,8 +134,7 @@ class _CertificateDetailsScreenState extends State { certInfo.rawCert != null ? ConfigItem( label: Text('PEM Format'), - content: - SelectableText(certInfo.rawCert, style: TextStyle(fontFamily: 'RobotoMono', fontSize: 14)), + content: SelectableText(certInfo.rawCert, style: TextStyle(fontFamily: 'RobotoMono', fontSize: 14)), crossAxisAlignment: CrossAxisAlignment.start) : Container(), ], @@ -156,7 +150,7 @@ class _CertificateDetailsScreenState extends State { padding: EdgeInsets.only(top: 50, bottom: 10, left: 10, right: 10), child: SizedBox( width: double.infinity, - child: PlatformButton( + child: PlatformElevatedButton( child: Text('Replace certificate'), color: CupertinoColors.systemRed.resolveFrom(context), onPressed: () { @@ -186,7 +180,7 @@ class _CertificateDetailsScreenState extends State { padding: EdgeInsets.only(top: 50, bottom: 10, left: 10, right: 10), child: SizedBox( width: double.infinity, - child: PlatformButton( + child: PlatformElevatedButton( child: Text('Delete'), color: CupertinoColors.systemRed.resolveFrom(context), onPressed: () => Utils.confirmDelete(context, title, () async { diff --git a/lib/screens/siteConfig/RenderedConfigScreen.dart b/lib/screens/siteConfig/RenderedConfigScreen.dart index 0a10a6d..0abb06d 100644 --- a/lib/screens/siteConfig/RenderedConfigScreen.dart +++ b/lib/screens/siteConfig/RenderedConfigScreen.dart @@ -1,4 +1,3 @@ -import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; diff --git a/lib/screens/siteConfig/SiteConfigScreen.dart b/lib/screens/siteConfig/SiteConfigScreen.dart index 9e8a1f7..7b16e50 100644 --- a/lib/screens/siteConfig/SiteConfigScreen.dart +++ b/lib/screens/siteConfig/SiteConfigScreen.dart @@ -3,7 +3,6 @@ import 'dart:convert'; import 'package:flutter/cupertino.dart'; import 'package:flutter/foundation.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/FormPage.dart'; import 'package:mobile_nebula/components/PlatformTextFormField.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; diff --git a/lib/screens/siteConfig/StaticHostmapScreen.dart b/lib/screens/siteConfig/StaticHostmapScreen.dart index 5b4b946..43399db 100644 --- a/lib/screens/siteConfig/StaticHostmapScreen.dart +++ b/lib/screens/siteConfig/StaticHostmapScreen.dart @@ -1,6 +1,5 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/FormPage.dart'; import 'package:mobile_nebula/components/IPAndPortFormField.dart'; @@ -103,7 +102,7 @@ class _StaticHostmapScreenState extends State { padding: EdgeInsets.only(top: 50, bottom: 10, left: 10, right: 10), child: SizedBox( width: double.infinity, - child: PlatformButton( + child: PlatformElevatedButton( child: Text('Delete'), color: CupertinoColors.systemRed.resolveFrom(context), onPressed: () => Utils.confirmDelete(context, 'Delete host map?', () { diff --git a/lib/screens/siteConfig/StaticHostsScreen.dart b/lib/screens/siteConfig/StaticHostsScreen.dart index 3e43f12..76c7daf 100644 --- a/lib/screens/siteConfig/StaticHostsScreen.dart +++ b/lib/screens/siteConfig/StaticHostsScreen.dart @@ -1,6 +1,5 @@ import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/FormPage.dart'; import 'package:mobile_nebula/components/config/ConfigButtonItem.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; diff --git a/lib/screens/siteConfig/UnsafeRouteScreen.dart b/lib/screens/siteConfig/UnsafeRouteScreen.dart index c772f81..82753a8 100644 --- a/lib/screens/siteConfig/UnsafeRouteScreen.dart +++ b/lib/screens/siteConfig/UnsafeRouteScreen.dart @@ -1,7 +1,4 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/services.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:mobile_nebula/components/CIDRFormField.dart'; import 'package:mobile_nebula/components/FormPage.dart'; @@ -92,7 +89,7 @@ class _UnsafeRouteScreenState extends State { padding: EdgeInsets.only(top: 50, bottom: 10, left: 10, right: 10), child: SizedBox( width: double.infinity, - child: PlatformButton( + child: PlatformElevatedButton( child: Text('Delete'), color: CupertinoColors.systemRed.resolveFrom(context), onPressed: () => Utils.confirmDelete(context, 'Delete unsafe route?', () { diff --git a/lib/screens/siteConfig/UnsafeRoutesScreen.dart b/lib/screens/siteConfig/UnsafeRoutesScreen.dart index 44d0aaa..10a8094 100644 --- a/lib/screens/siteConfig/UnsafeRoutesScreen.dart +++ b/lib/screens/siteConfig/UnsafeRoutesScreen.dart @@ -1,6 +1,4 @@ import 'package:flutter/cupertino.dart'; -import 'package:flutter/material.dart'; -import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/FormPage.dart'; import 'package:mobile_nebula/components/config/ConfigButtonItem.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; diff --git a/lib/services/utils.dart b/lib/services/utils.dart index 78daf5b..d22711a 100644 --- a/lib/services/utils.dart +++ b/lib/services/utils.dart @@ -1,11 +1,8 @@ import 'dart:io'; -import 'dart:ui'; import 'package:file_picker/file_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; -import 'package:flutter/painting.dart'; -import 'package:flutter/widgets.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; import 'package:url_launcher/url_launcher.dart';