From 4bcfe0a34b6ca6e0f9770bf05d1c692176e293a9 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 13:28:49 -0400 Subject: [PATCH 01/36] Restore project to manifests --- android/app/src/debug/AndroidManifest.xml | 3 ++- android/app/src/main/AndroidManifest.xml | 3 ++- android/app/src/profile/AndroidManifest.xml | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index f880684a..bc4f1bfd 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,4 +1,5 @@ - + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 8c780350..97599c55 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,5 +1,6 @@ + xmlns:tools="http://schemas.android.com/tools" + package="net.defined.mobile_nebula"> From 610fc0eff6fbcae62d6d907ce14b2b1d21708282 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 13:29:21 -0400 Subject: [PATCH 02/36] Update go.mod and go.sum --- nebula/go.mod | 15 ++++++++------- nebula/go.sum | 12 ++++++++++++ 2 files changed, 20 insertions(+), 7 deletions(-) diff --git a/nebula/go.mod b/nebula/go.mod index 47ce7be9..a7e350e4 100644 --- a/nebula/go.mod +++ b/nebula/go.mod @@ -10,7 +10,7 @@ require ( github.com/DefinedNet/dnapi v0.0.0-20240611201323-4589547bd270 github.com/sirupsen/logrus v1.9.3 github.com/slackhq/nebula v1.9.3 - golang.org/x/crypto v0.24.0 + golang.org/x/crypto v0.26.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -34,12 +34,13 @@ require ( github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 // indirect github.com/vishvananda/netlink v1.2.1-beta.2 // indirect github.com/vishvananda/netns v0.0.4 // indirect - golang.org/x/mod v0.18.0 // indirect - golang.org/x/net v0.26.0 // indirect - golang.org/x/sync v0.7.0 // indirect - golang.org/x/sys v0.21.0 // indirect - golang.org/x/term v0.21.0 // indirect - golang.org/x/tools v0.22.0 // indirect + golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab // indirect + golang.org/x/mod v0.20.0 // indirect + golang.org/x/net v0.28.0 // indirect + golang.org/x/sync v0.8.0 // indirect + golang.org/x/sys v0.23.0 // indirect + golang.org/x/term v0.23.0 // indirect + golang.org/x/tools v0.24.0 // indirect golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect golang.zx2c4.com/wireguard/windows v0.5.3 // indirect diff --git a/nebula/go.sum b/nebula/go.sum index 3d7dd45a..022395e2 100644 --- a/nebula/go.sum +++ b/nebula/go.sum @@ -147,12 +147,17 @@ golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPh golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= +golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab h1:KONOFF8Uy3b60HEzOsGnNghORNhY4ImyOx0PGm73K9k= +golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab/go.mod h1:udWezQGYjqrCxz5nV321pXQTx5oGbZx+khZvFjZNOPM= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= +golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -165,6 +170,7 @@ golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwY golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= +golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -174,6 +180,8 @@ golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= +golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= +golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20181116152217-5ac8a444bdc5/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -192,9 +200,11 @@ golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= +golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -205,6 +215,8 @@ golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roY golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= +golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= +golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From cd83beaa6e506c47caf7355026ad30c22f2a2d5b Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 14:22:23 -0400 Subject: [PATCH 03/36] Update Gradle --- android/build.gradle | 2 +- android/gradle/wrapper/gradle-wrapper.properties | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/android/build.gradle b/android/build.gradle index 9444e0b7..80067ce6 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -10,7 +10,7 @@ buildscript { } dependencies { - classpath 'com.android.tools.build:gradle:7.3.1' + classpath 'com.android.tools.build:gradle:7.4.2' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" } } diff --git a/android/gradle/wrapper/gradle-wrapper.properties b/android/gradle/wrapper/gradle-wrapper.properties index cb24abda..3c472b99 100644 --- a/android/gradle/wrapper/gradle-wrapper.properties +++ b/android/gradle/wrapper/gradle-wrapper.properties @@ -2,4 +2,4 @@ distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-all.zip From b598aa338f133eef76388bdabe3703ada15c09ab Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 14:45:00 -0400 Subject: [PATCH 04/36] Flutter: remove deprecated / removed theme definitions https://docs.flutter.dev/release/breaking-changes/theme-data-accent-properties#migration-guide https://docs.flutter.dev/release/breaking-changes/3-10-deprecations#themedata-primarycolorbrightness --- lib/main.dart | 6 ------ 1 file changed, 6 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 5d68fcc1..19626c25 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -61,9 +61,6 @@ class _AppState extends State { brightness: Brightness.light, primarySwatch: Colors.blueGrey, primaryColor: Colors.blueGrey[900], - primaryColorBrightness: Brightness.dark, - accentColor: Colors.cyan[600], - accentColorBrightness: Brightness.dark, fontFamily: 'PublicSans', //scaffoldBackgroundColor: Colors.grey[100], scaffoldBackgroundColor: Colors.white, @@ -76,9 +73,6 @@ class _AppState extends State { brightness: Brightness.dark, primarySwatch: Colors.grey, primaryColor: Colors.grey[900], - primaryColorBrightness: Brightness.dark, - accentColor: Colors.cyan[600], - accentColorBrightness: Brightness.dark, fontFamily: 'PublicSans', scaffoldBackgroundColor: Colors.grey[800], bottomSheetTheme: BottomSheetThemeData( From 35fbf86c8c14f895ddc6d3dfd95665b428f0fad8 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 14:46:03 -0400 Subject: [PATCH 05/36] Format code --- lib/components/SiteItem.dart | 9 +- lib/components/config/ConfigPageItem.dart | 4 +- lib/main.dart | 8 +- lib/models/Site.dart | 3 +- lib/screens/EnrollmentScreen.dart | 91 +++++++------- lib/screens/HostInfoScreen.dart | 9 +- lib/screens/MainScreen.dart | 28 ++--- lib/screens/SettingsScreen.dart | 11 +- lib/screens/SiteDetailScreen.dart | 59 ++++----- lib/screens/SiteLogsScreen.dart | 48 ++++---- lib/screens/SiteTunnelsScreen.dart | 25 ++-- .../siteConfig/AddCertificateScreen.dart | 18 ++- lib/screens/siteConfig/AdvancedScreen.dart | 112 +++++++++--------- lib/screens/siteConfig/CAListScreen.dart | 42 +++---- .../siteConfig/CertificateDetailsScreen.dart | 26 ++-- .../siteConfig/RenderedConfigScreen.dart | 18 ++- lib/screens/siteConfig/SiteConfigScreen.dart | 96 ++++++++------- .../siteConfig/StaticHostmapScreen.dart | 98 ++++++++------- lib/screens/siteConfig/StaticHostsScreen.dart | 35 +++--- lib/services/share.dart | 7 +- 20 files changed, 377 insertions(+), 370 deletions(-) diff --git a/lib/components/SiteItem.dart b/lib/components/SiteItem.dart index 90b04adc..4896d20c 100644 --- a/lib/components/SiteItem.dart +++ b/lib/components/SiteItem.dart @@ -28,7 +28,8 @@ class SiteItem extends StatelessWidget { Widget _buildContent(BuildContext context) { final border = BorderSide(color: Utils.configSectionBorder(context)); - final dnIcon = Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; + final dnIcon = + Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; return SpecialButton( decoration: @@ -39,9 +40,9 @@ class SiteItem extends StatelessWidget { child: Row( crossAxisAlignment: CrossAxisAlignment.center, children: [ - site.managed ? - Padding(padding: EdgeInsets.only(right: 10), child: SvgPicture.asset(dnIcon, width: 12)) : - Container(), + site.managed + ? Padding(padding: EdgeInsets.only(right: 10), child: SvgPicture.asset(dnIcon, width: 12)) + : Container(), Expanded(child: Text(site.name, style: TextStyle(fontWeight: FontWeight.bold))), Padding(padding: EdgeInsets.only(right: 10)), Icon(CupertinoIcons.forward, color: CupertinoColors.placeholderText.resolveFrom(context), size: 18) diff --git a/lib/components/config/ConfigPageItem.dart b/lib/components/config/ConfigPageItem.dart index 30aeb1ee..067a1d35 100644 --- a/lib/components/config/ConfigPageItem.dart +++ b/lib/components/config/ConfigPageItem.dart @@ -52,7 +52,9 @@ class ConfigPageItem extends StatelessWidget { children: [ label != null ? Container(width: labelWidth, child: label) : Container(), Expanded(child: Container(child: content, padding: EdgeInsets.only(right: 10))), - this.disabled ? Container() : Icon(CupertinoIcons.forward, color: CupertinoColors.placeholderText.resolveFrom(context), size: 18) + this.disabled + ? Container() + : Icon(CupertinoIcons.forward, color: CupertinoColors.placeholderText.resolveFrom(context), size: 18) ], )), ); diff --git a/lib/main.dart b/lib/main.dart index 19626c25..b051cba8 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -110,11 +110,9 @@ class _AppState extends State { if (uri.path == EnrollmentScreen.routeName) { // TODO: maybe implement this as a dialog instead of a page, you can stack multiple enrollment screens which is annoying in dev return platformPageRoute( - context: context, - builder: (context) => EnrollmentScreen( - code: EnrollmentScreen.parseCode(settings.name!), - stream: this.dnEnrolled - ), + context: context, + builder: (context) => + EnrollmentScreen(code: EnrollmentScreen.parseCode(settings.name!), stream: this.dnEnrolled), ); } diff --git a/lib/models/Site.dart b/lib/models/Site.dart index daecef38..46ee2318 100644 --- a/lib/models/Site.dart +++ b/lib/models/Site.dart @@ -206,8 +206,7 @@ class Site { "unsafeRoutes": unsafeRoutes, "managed": json['managed'] ?? false, "rawConfig": json['rawConfig'], - "lastManagedUpdate": json["lastManagedUpdate"] == null ? - null : DateTime.parse(json["lastManagedUpdate"]), + "lastManagedUpdate": json["lastManagedUpdate"] == null ? null : DateTime.parse(json["lastManagedUpdate"]), }; } diff --git a/lib/screens/EnrollmentScreen.dart b/lib/screens/EnrollmentScreen.dart index ff69d5b9..7d494bea 100644 --- a/lib/screens/EnrollmentScreen.dart +++ b/lib/screens/EnrollmentScreen.dart @@ -91,37 +91,38 @@ class _EnrollmentScreenState extends State { } else { // No code, show the error child = Padding( - child: Center(child: Text( + child: Center( + child: Text( 'No valid enrollment code was found.\n\nContact your administrator to obtain a new enrollment code.', textAlign: TextAlign.center, - )), - padding: EdgeInsets.only(top: 20) - ); + padding: EdgeInsets.only(top: 20)); } - } else if (this.error != null) { // Error while enrolling, display it - child = Center(child: Column( + child = Center( + child: Column( children: [ Padding( - child: SelectableText('There was an issue while attempting to enroll this device. Contact your administrator to obtain a new enrollment code.'), - padding: EdgeInsets.symmetric(vertical: 20) - ), - Padding(child: SelectableText.rich(TextSpan(children: [ - TextSpan(text: 'If the problem persists, please let us know at '), - TextSpan( - text: 'support@defined.net', - style: bodyTextStyle.apply(color: colorScheme.primary), - recognizer: TapGestureRecognizer() - ..onTap = () async { - if (await canLaunchUrl(contactUri)) { - print(await launchUrl(contactUri)); - } - }, - ), - TextSpan(text: ' and provide the following error:'), - ])), padding: EdgeInsets.only(bottom: 10)), + child: SelectableText( + 'There was an issue while attempting to enroll this device. Contact your administrator to obtain a new enrollment code.'), + padding: EdgeInsets.symmetric(vertical: 20)), + Padding( + child: SelectableText.rich(TextSpan(children: [ + TextSpan(text: 'If the problem persists, please let us know at '), + TextSpan( + text: 'support@defined.net', + style: bodyTextStyle.apply(color: colorScheme.primary), + recognizer: TapGestureRecognizer() + ..onTap = () async { + if (await canLaunchUrl(contactUri)) { + print(await launchUrl(contactUri)); + } + }, + ), + TextSpan(text: ' and provide the following error:'), + ])), + padding: EdgeInsets.only(bottom: 10)), Container( child: Padding(child: SelectableText(this.error!), padding: EdgeInsets.all(10)), color: Theme.of(context).colorScheme.errorContainer, @@ -130,47 +131,43 @@ class _EnrollmentScreenState extends State { crossAxisAlignment: CrossAxisAlignment.center, mainAxisAlignment: MainAxisAlignment.center, )); - } else if (this.enrolled) { // Enrollment complete! child = Padding( - child: Center(child: Text( + child: Center( + child: Text( 'Enrollment complete! 🎉', textAlign: TextAlign.center, )), - padding: EdgeInsets.only(top: 20) - ); - + padding: EdgeInsets.only(top: 20)); } else { // Have a code and actively enrolling alignment = Alignment.center; - child = Center(child: Column( - children: [ - Padding(child: Text('Contacting DN for enrollment'), padding: EdgeInsets.only(bottom: 25)), - PlatformCircularProgressIndicator(cupertino: (_, __) { - return CupertinoProgressIndicatorData(radius: 50); - }) - ] - )); + child = Center( + child: Column(children: [ + Padding(child: Text('Contacting DN for enrollment'), padding: EdgeInsets.only(bottom: 25)), + PlatformCircularProgressIndicator(cupertino: (_, __) { + return CupertinoProgressIndicatorData(radius: 50); + }) + ])); } - final dnIcon = Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; + final dnIcon = + Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; return SimplePage( - title: Text('Enroll with Managed Nebula', style: TextStyle(fontWeight: FontWeight.bold)), - child: Padding(child: child, padding: EdgeInsets.symmetric(horizontal: 10)), - alignment: alignment - ); + title: Text('Enroll with Managed Nebula', style: TextStyle(fontWeight: FontWeight.bold)), + child: Padding(child: child, padding: EdgeInsets.symmetric(horizontal: 10)), + alignment: alignment); } Widget _codeEntry() { return Column(children: [ Padding( - padding: EdgeInsets.only(top: 20), - child: PlatformTextField( - hintText: 'defined.net enrollment code or link', - controller: enrollInput, - ) - ), + padding: EdgeInsets.only(top: 20), + child: PlatformTextField( + hintText: 'defined.net enrollment code or link', + controller: enrollInput, + )), PlatformTextButton( child: Text('Submit'), onPressed: () { diff --git a/lib/screens/HostInfoScreen.dart b/lib/screens/HostInfoScreen.dart index 461ee88b..169a22c3 100644 --- a/lib/screens/HostInfoScreen.dart +++ b/lib/screens/HostInfoScreen.dart @@ -75,10 +75,11 @@ class _HostInfoScreenState extends State { labelWidth: 150, content: Text(hostInfo.cert!.details.name), onPressed: () => Utils.openPage( - context, (context) => CertificateDetailsScreen( - certInfo: CertificateInfo(cert: hostInfo.cert!), - supportsQRScanning: widget.supportsQRScanning, - ))) + context, + (context) => CertificateDetailsScreen( + certInfo: CertificateInfo(cert: hostInfo.cert!), + supportsQRScanning: widget.supportsQRScanning, + ))) : Container(), ]); } diff --git a/lib/screens/MainScreen.dart b/lib/screens/MainScreen.dart index 337d0b12..728018c6 100644 --- a/lib/screens/MainScreen.dart +++ b/lib/screens/MainScreen.dart @@ -128,9 +128,9 @@ class _MainScreenState extends State { // Determine whether the device supports QR scanning. For example, some // Chromebooks do not have camera support. if (Platform.isAndroid) { - platform.invokeMethod("android.deviceHasCamera").then( - (hasCamera) => setState(() => supportsQRScanning = hasCamera) - ); + platform + .invokeMethod("android.deviceHasCamera") + .then((hasCamera) => setState(() => supportsQRScanning = hasCamera)); } else { supportsQRScanning = true; } @@ -143,9 +143,11 @@ class _MainScreenState extends State { padding: EdgeInsets.zero, icon: Icon(Icons.add, size: 28.0), onPressed: () => Utils.openPage(context, (context) { - return SiteConfigScreen(onSave: (_) { - _loadSites(); - }, supportsQRScanning: supportsQRScanning); + return SiteConfigScreen( + onSave: (_) { + _loadSites(); + }, + supportsQRScanning: supportsQRScanning); }), ), refreshController: refreshController, @@ -210,9 +212,9 @@ class _MainScreenState extends State { onPressed: () { Utils.openPage(context, (context) { return SiteDetailScreen( - site: site, - onChanged: () => _loadSites(), - supportsQRScanning: supportsQRScanning, + site: site, + onChanged: () => _loadSites(), + supportsQRScanning: supportsQRScanning, ); }); })); @@ -289,16 +291,15 @@ class _MainScreenState extends State { ); } - Widget _debugClearKeys() { + Widget _debugClearKeys() { return CupertinoButton( child: Text("Clear Keys"), onPressed: () async { - await platform.invokeMethod("debug.clearKeys", null); - }, + await platform.invokeMethod("debug.clearKeys", null); + }, ); } - _loadSites() async { //TODO: This can throw, we need to show an error dialog Map rawSites = jsonDecode(await platform.invokeMethod('listSites')); @@ -322,7 +323,6 @@ class _MainScreenState extends State { } }); - sites!.add(site); } catch (err) { //TODO: handle error diff --git a/lib/screens/SettingsScreen.dart b/lib/screens/SettingsScreen.dart index d287e6bb..50cfa0e5 100644 --- a/lib/screens/SettingsScreen.dart +++ b/lib/screens/SettingsScreen.dart @@ -86,13 +86,14 @@ class _SettingsScreenState extends State { )), )); - final dnIcon = Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; + final dnIcon = + Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; items.add(ConfigSection(children: [ ConfigPageItem( - label: Text('Enroll with Managed Nebula'), - labelWidth: 200, - onPressed: () => Utils.openPage(context, (context) => EnrollmentScreen(stream: widget.stream, allowCodeEntry: true)) - ) + label: Text('Enroll with Managed Nebula'), + labelWidth: 200, + onPressed: () => + Utils.openPage(context, (context) => EnrollmentScreen(stream: widget.stream, allowCodeEntry: true))) ])); items.add(ConfigSection(children: [ diff --git a/lib/screens/SiteDetailScreen.dart b/lib/screens/SiteDetailScreen.dart index a69b4c11..6bf2c195 100644 --- a/lib/screens/SiteDetailScreen.dart +++ b/lib/screens/SiteDetailScreen.dart @@ -79,11 +79,12 @@ class _SiteDetailScreenState extends State { @override Widget build(BuildContext context) { - final dnIcon = Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; + final dnIcon = + Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; final title = Row(children: [ - site.managed ? - Padding(padding: EdgeInsets.only(right: 10), child: SvgPicture.asset(dnIcon, width: 12)) : - Container(), + site.managed + ? Padding(padding: EdgeInsets.only(right: 10), child: SvgPicture.asset(dnIcon, width: 12)) + : Container(), Expanded(child: Text(site.name, style: TextStyle(fontWeight: FontWeight.bold))) ]); @@ -192,16 +193,16 @@ class _SiteDetailScreenState extends State { Utils.openPage( context, (context) => SiteTunnelsScreen( - pending: false, - tunnels: activeHosts!, - site: site, - onChanged: (hosts) { - setState(() { - activeHosts = hosts; - }); - }, - supportsQRScanning: widget.supportsQRScanning, - )); + pending: false, + tunnels: activeHosts!, + site: site, + onChanged: (hosts) { + setState(() { + activeHosts = hosts; + }); + }, + supportsQRScanning: widget.supportsQRScanning, + )); }, label: Text("Active"), content: Container(alignment: Alignment.centerRight, child: active)), @@ -212,16 +213,16 @@ class _SiteDetailScreenState extends State { Utils.openPage( context, (context) => SiteTunnelsScreen( - pending: true, - tunnels: pendingHosts!, - site: site, - onChanged: (hosts) { - setState(() { - pendingHosts = hosts; - }); - }, - supportsQRScanning: widget.supportsQRScanning, - )); + pending: true, + tunnels: pendingHosts!, + site: site, + onChanged: (hosts) { + setState(() { + pendingHosts = hosts; + }); + }, + supportsQRScanning: widget.supportsQRScanning, + )); }, label: Text("Pending"), content: Container(alignment: Alignment.centerRight, child: pending)) @@ -237,11 +238,11 @@ class _SiteDetailScreenState extends State { onPressed: () { Utils.openPage(context, (context) { return SiteConfigScreen( - site: widget.site, - onSave: (site) async { - changed = true; - setState(() {}); - }, + site: widget.site, + onSave: (site) async { + changed = true; + setState(() {}); + }, supportsQRScanning: widget.supportsQRScanning, ); }); diff --git a/lib/screens/SiteLogsScreen.dart b/lib/screens/SiteLogsScreen.dart index 76341521..3ac812ee 100644 --- a/lib/screens/SiteLogsScreen.dart +++ b/lib/screens/SiteLogsScreen.dart @@ -40,11 +40,12 @@ class _SiteLogsScreenState extends State { @override Widget build(BuildContext context) { - final dnIcon = Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; + final dnIcon = + Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; final title = Row(children: [ - widget.site.managed ? - Padding(padding: EdgeInsets.only(right: 10), child: SvgPicture.asset(dnIcon, width: 12)) : - Container(), + widget.site.managed + ? Padding(padding: EdgeInsets.only(right: 10), child: SvgPicture.asset(dnIcon, width: 12)) + : Container(), Expanded(child: Text(widget.site.name, style: TextStyle(fontWeight: FontWeight.bold))) ]); @@ -83,29 +84,26 @@ class _SiteLogsScreenState extends State { border: Border(top: borderSide), ), child: Row(mainAxisAlignment: MainAxisAlignment.center, children: [ - Expanded( - child: Builder( - builder: (BuildContext context) { - return PlatformIconButton( - padding: padding, - icon: Icon(context.platformIcons.share, size: 30), - onPressed: () { - Share.shareFile(context, - title: '${widget.site.name} logs', - filePath: widget.site.logFile, - filename: '${widget.site.name}.log'); - }, - ); - } - )), + Expanded(child: Builder(builder: (BuildContext context) { + return PlatformIconButton( + padding: padding, + icon: Icon(context.platformIcons.share, size: 30), + onPressed: () { + Share.shareFile(context, + title: '${widget.site.name} logs', + filePath: widget.site.logFile, + filename: '${widget.site.name}.log'); + }, + ); + })), Expanded( child: PlatformIconButton( - padding: padding, - icon: Icon(context.platformIcons.downArrow, size: 30), - onPressed: () async { - controller.animateTo(controller.position.maxScrollExtent, - duration: const Duration(milliseconds: 500), curve: Curves.linearToEaseOut); - }, + padding: padding, + icon: Icon(context.platformIcons.downArrow, size: 30), + onPressed: () async { + controller.animateTo(controller.position.maxScrollExtent, + duration: const Duration(milliseconds: 500), curve: Curves.linearToEaseOut); + }, )), ])); } diff --git a/lib/screens/SiteTunnelsScreen.dart b/lib/screens/SiteTunnelsScreen.dart index 133f4c3f..706d8517 100644 --- a/lib/screens/SiteTunnelsScreen.dart +++ b/lib/screens/SiteTunnelsScreen.dart @@ -17,8 +17,7 @@ class SiteTunnelsScreen extends StatefulWidget { required this.pending, required this.onChanged, required this.supportsQRScanning, - }) - : super(key: key); + }) : super(key: key); final Site site; final List tunnels; @@ -67,17 +66,17 @@ class _SiteTunnelsScreenState extends State { children.add(ConfigPageItem( onPressed: () => Utils.openPage( - context, - (context) => HostInfoScreen( - isLighthouse: isLh, - hostInfo: hostInfo, - pending: widget.pending, - site: widget.site, - onChanged: () { - _listHostmap(); - }, - supportsQRScanning: widget.supportsQRScanning, - ), + context, + (context) => HostInfoScreen( + isLighthouse: isLh, + hostInfo: hostInfo, + pending: widget.pending, + site: widget.site, + onChanged: () { + _listHostmap(); + }, + supportsQRScanning: widget.supportsQRScanning, + ), ), label: Row(children: [Padding(child: icon, padding: EdgeInsets.only(right: 10)), Text(hostInfo.vpnIp)]), labelWidth: ipWidth, diff --git a/lib/screens/siteConfig/AddCertificateScreen.dart b/lib/screens/siteConfig/AddCertificateScreen.dart index ae90a8c9..af567d3d 100644 --- a/lib/screens/siteConfig/AddCertificateScreen.dart +++ b/lib/screens/siteConfig/AddCertificateScreen.dart @@ -98,12 +98,10 @@ class _AddCertificateScreenState extends State { content: Text('Share Public Key'), onPressed: () async { await Share.share(context, - title: 'Please sign and return a certificate', - text: pubKey, - filename: 'device.pub'); + title: 'Please sign and return a certificate', text: pubKey, filename: 'device.pub'); }, ); - }, + }, ), ]) ]; @@ -269,12 +267,12 @@ class _AddCertificateScreenState extends State { // We have a cert, pop the details screen where they can hit save Utils.openPage(context, (context) { return CertificateDetailsScreen( - certInfo: tryCertInfo, - onSave: () { - Navigator.pop(context); - widget.onSave!(CertificateResult(certInfo: tryCertInfo, key: keyController.text)); - }, - supportsQRScanning: widget.supportsQRScanning, + certInfo: tryCertInfo, + onSave: () { + Navigator.pop(context); + widget.onSave!(CertificateResult(certInfo: tryCertInfo, key: keyController.text)); + }, + supportsQRScanning: widget.supportsQRScanning, ); }); } diff --git a/lib/screens/siteConfig/AdvancedScreen.dart b/lib/screens/siteConfig/AdvancedScreen.dart index f76a5ed6..247b981a 100644 --- a/lib/screens/siteConfig/AdvancedScreen.dart +++ b/lib/screens/siteConfig/AdvancedScreen.dart @@ -86,62 +86,62 @@ class _AdvancedScreenState extends State { label: Text("Lighthouse interval"), labelWidth: 200, //TODO: Auto select on focus? - content: widget.site.managed ? - Text(settings.lhDuration.toString() + " seconds", textAlign: TextAlign.right) : - PlatformTextFormField( - initialValue: settings.lhDuration.toString(), - keyboardType: TextInputType.number, - suffix: Text("seconds"), - textAlign: TextAlign.right, - maxLength: 5, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - onSaved: (val) { - setState(() { - if (val != null) { - settings.lhDuration = int.parse(val); - } - }); - }, - )), + content: widget.site.managed + ? Text(settings.lhDuration.toString() + " seconds", textAlign: TextAlign.right) + : PlatformTextFormField( + initialValue: settings.lhDuration.toString(), + keyboardType: TextInputType.number, + suffix: Text("seconds"), + textAlign: TextAlign.right, + maxLength: 5, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + onSaved: (val) { + setState(() { + if (val != null) { + settings.lhDuration = int.parse(val); + } + }); + }, + )), ConfigItem( label: Text("Listen port"), labelWidth: 150, //TODO: Auto select on focus? - content: widget.site.managed ? - Text(settings.port.toString(), textAlign: TextAlign.right) : - PlatformTextFormField( - initialValue: settings.port.toString(), - keyboardType: TextInputType.number, - textAlign: TextAlign.right, - maxLength: 5, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - onSaved: (val) { - setState(() { - if (val != null) { - settings.port = int.parse(val); - } - }); - }, - )), + content: widget.site.managed + ? Text(settings.port.toString(), textAlign: TextAlign.right) + : PlatformTextFormField( + initialValue: settings.port.toString(), + keyboardType: TextInputType.number, + textAlign: TextAlign.right, + maxLength: 5, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + onSaved: (val) { + setState(() { + if (val != null) { + settings.port = int.parse(val); + } + }); + }, + )), ConfigItem( label: Text("MTU"), labelWidth: 150, - content: widget.site.managed ? - Text(settings.mtu.toString(), textAlign: TextAlign.right) : - PlatformTextFormField( - initialValue: settings.mtu.toString(), - keyboardType: TextInputType.number, - textAlign: TextAlign.right, - maxLength: 5, - inputFormatters: [FilteringTextInputFormatter.digitsOnly], - onSaved: (val) { - setState(() { - if (val != null) { - settings.mtu = int.parse(val); - } - }); - }, - )), + content: widget.site.managed + ? Text(settings.mtu.toString(), textAlign: TextAlign.right) + : PlatformTextFormField( + initialValue: settings.mtu.toString(), + keyboardType: TextInputType.number, + textAlign: TextAlign.right, + maxLength: 5, + inputFormatters: [FilteringTextInputFormatter.digitsOnly], + onSaved: (val) { + setState(() { + if (val != null) { + settings.mtu = int.parse(val); + } + }); + }, + )), ConfigPageItem( disabled: widget.site.managed, label: Text('Cipher'), @@ -184,12 +184,14 @@ class _AdvancedScreenState extends State { Utils.openPage(context, (context) { return UnsafeRoutesScreen( unsafeRoutes: settings.unsafeRoutes, - onSave: widget.site.managed ? null : (routes) { - setState(() { - settings.unsafeRoutes = routes; - changed = true; - }); - }); + onSave: widget.site.managed + ? null + : (routes) { + setState(() { + settings.unsafeRoutes = routes; + changed = true; + }); + }); }); }, ) diff --git a/lib/screens/siteConfig/CAListScreen.dart b/lib/screens/siteConfig/CAListScreen.dart index 65bcf720..df2958fc 100644 --- a/lib/screens/siteConfig/CAListScreen.dart +++ b/lib/screens/siteConfig/CAListScreen.dart @@ -64,18 +64,18 @@ class _CAListScreenState extends State { } return FormPage( - title: 'Certificate Authorities', - changed: changed, - onSave: () { - if (widget.onSave != null) { - Navigator.pop(context); - widget.onSave!(cas.values.map((ca) { - return ca; - }).toList()); - } - }, - child: Column(children: items)); - } + title: 'Certificate Authorities', + changed: changed, + onSave: () { + if (widget.onSave != null) { + Navigator.pop(context); + widget.onSave!(cas.values.map((ca) { + return ca; + }).toList()); + } + }, + child: Column(children: items)); + } List _buildCAs() { List items = []; @@ -85,14 +85,16 @@ class _CAListScreenState extends State { onPressed: () { Utils.openPage(context, (context) { return CertificateDetailsScreen( - certInfo: ca, - onDelete: widget.onSave == null ? null : () { - setState(() { - changed = true; - cas.remove(key); - }); - }, - supportsQRScanning: widget.supportsQRScanning, + certInfo: ca, + onDelete: widget.onSave == null + ? null + : () { + setState(() { + changed = true; + cas.remove(key); + }); + }, + supportsQRScanning: widget.supportsQRScanning, ); }); }, diff --git a/lib/screens/siteConfig/CertificateDetailsScreen.dart b/lib/screens/siteConfig/CertificateDetailsScreen.dart index 1ca0ea6d..f6fb76c5 100644 --- a/lib/screens/siteConfig/CertificateDetailsScreen.dart +++ b/lib/screens/siteConfig/CertificateDetailsScreen.dart @@ -170,19 +170,19 @@ class _CertificateDetailsScreenState extends State { onPressed: () { Utils.openPage(context, (context) { return AddCertificateScreen( - onReplace: (result) { - setState(() { - changed = true; - certResult = result; - certInfo = result.certInfo; - }); - // Slam the page back to the top - controller.animateTo(0, - duration: const Duration(milliseconds: 10), curve: Curves.linearToEaseOut); - }, - pubKey: widget.pubKey!, - privKey: widget.privKey!, - supportsQRScanning: widget.supportsQRScanning, + onReplace: (result) { + setState(() { + changed = true; + certResult = result; + certInfo = result.certInfo; + }); + // Slam the page back to the top + controller.animateTo(0, + duration: const Duration(milliseconds: 10), curve: Curves.linearToEaseOut); + }, + pubKey: widget.pubKey!, + privKey: widget.privKey!, + supportsQRScanning: widget.supportsQRScanning, ); }); }))); diff --git a/lib/screens/siteConfig/RenderedConfigScreen.dart b/lib/screens/siteConfig/RenderedConfigScreen.dart index 16d6fbf2..f0246c32 100644 --- a/lib/screens/siteConfig/RenderedConfigScreen.dart +++ b/lib/screens/siteConfig/RenderedConfigScreen.dart @@ -19,17 +19,13 @@ class RenderedConfigScreen extends StatelessWidget { title: Text('Rendered Site Config'), scrollable: SimpleScrollable.both, trailingActions: [ - Builder( - builder: (BuildContext context) { - return PlatformIconButton( - padding: EdgeInsets.zero, - icon: Icon(context.platformIcons.share, size: 28.0), - onPressed: () => - Share.share(context, - title: '$name.yaml', text: config, filename: '$name.yaml'), - ); - } - ), + Builder(builder: (BuildContext context) { + return PlatformIconButton( + padding: EdgeInsets.zero, + icon: Icon(context.platformIcons.share, size: 28.0), + onPressed: () => Share.share(context, title: '$name.yaml', text: config, filename: '$name.yaml'), + ); + }), ], child: Container( padding: EdgeInsets.all(5), diff --git a/lib/screens/siteConfig/SiteConfigScreen.dart b/lib/screens/siteConfig/SiteConfigScreen.dart index 1709a4d4..5c187ec7 100644 --- a/lib/screens/siteConfig/SiteConfigScreen.dart +++ b/lib/screens/siteConfig/SiteConfigScreen.dart @@ -139,17 +139,17 @@ class _SiteConfigScreenState extends State { lastUpdate = formatter.format(site.lastManagedUpdate!.toLocal()); } - return site.managed ? ConfigSection( - label: "MANAGED CONFIG", - children: [ - ConfigItem( - label: Text("Last Update"), - content: Wrap(alignment: WrapAlignment.end, crossAxisAlignment: WrapCrossAlignment.center, children: [ - Text(lastUpdate), - ]), - ) - ] - ) : Container(); + return site.managed + ? ConfigSection(label: "MANAGED CONFIG", children: [ + ConfigItem( + label: Text("Last Update"), + content: + Wrap(alignment: WrapAlignment.end, crossAxisAlignment: WrapCrossAlignment.center, children: [ + Text(lastUpdate), + ]), + ) + ]) + : Container(); } Widget _keys() { @@ -183,30 +183,32 @@ class _SiteConfigScreenState extends State { Utils.openPage(context, (context) { if (site.certInfo != null) { return CertificateDetailsScreen( - certInfo: site.certInfo!, - pubKey: pubKey, - privKey: privKey, - onReplace: site.managed ? null : (result) { - setState(() { - changed = true; - site.certInfo = result.certInfo; - site.key = result.key; - }); - }, - supportsQRScanning: widget.supportsQRScanning, + certInfo: site.certInfo!, + pubKey: pubKey, + privKey: privKey, + onReplace: site.managed + ? null + : (result) { + setState(() { + changed = true; + site.certInfo = result.certInfo; + site.key = result.key; + }); + }, + supportsQRScanning: widget.supportsQRScanning, ); } return AddCertificateScreen( - pubKey: pubKey!, - privKey: privKey!, - onSave: (result) { - setState(() { - changed = true; - site.certInfo = result.certInfo; - site.key = result.key; - }); - }, + pubKey: pubKey!, + privKey: privKey!, + onSave: (result) { + setState(() { + changed = true; + site.certInfo = result.certInfo; + site.key = result.key; + }); + }, supportsQRScanning: widget.supportsQRScanning, ); }); @@ -226,14 +228,16 @@ class _SiteConfigScreenState extends State { onPressed: () { Utils.openPage(context, (context) { return CAListScreen( - cas: site.ca, - onSave: site.managed ? null : (ca) { - setState(() { - changed = true; - site.ca = ca; - }); - }, - supportsQRScanning: widget.supportsQRScanning, + cas: site.ca, + onSave: site.managed + ? null + : (ca) { + setState(() { + changed = true; + site.ca = ca; + }); + }, + supportsQRScanning: widget.supportsQRScanning, ); }); }) @@ -261,12 +265,14 @@ class _SiteConfigScreenState extends State { Utils.openPage(context, (context) { return StaticHostsScreen( hostmap: site.staticHostmap, - onSave: site.managed ? null : (map) { - setState(() { - changed = true; - site.staticHostmap = map; - }); - }); + onSave: site.managed + ? null + : (map) { + setState(() { + changed = true; + site.staticHostmap = map; + }); + }); }); }, ), diff --git a/lib/screens/siteConfig/StaticHostmapScreen.dart b/lib/screens/siteConfig/StaticHostmapScreen.dart index 814c380c..f07e0287 100644 --- a/lib/screens/siteConfig/StaticHostmapScreen.dart +++ b/lib/screens/siteConfig/StaticHostmapScreen.dart @@ -66,7 +66,11 @@ class _StaticHostmapScreenState extends State { @override Widget build(BuildContext context) { return FormPage( - title: widget.onDelete == null ? widget.onSave == null ? 'View Static Host' : 'New Static Host' : 'Edit Static Host', + title: widget.onDelete == null + ? widget.onSave == null + ? 'View Static Host' + : 'New Static Host' + : 'Edit Static Host', changed: changed, onSave: _onSave, child: Column(children: [ @@ -74,20 +78,20 @@ class _StaticHostmapScreenState extends State { ConfigItem( label: Text('Nebula IP'), labelWidth: 200, - content: widget.onSave == null ? - Text(_nebulaIp, textAlign: TextAlign.end) : - IPFormField( - help: "Required", - initialValue: _nebulaIp, - ipOnly: true, - textAlign: TextAlign.end, - crossAxisAlignment: CrossAxisAlignment.end, - textInputAction: TextInputAction.next, - onSaved: (v) { - if (v != null) { - _nebulaIp = v; - } - })), + content: widget.onSave == null + ? Text(_nebulaIp, textAlign: TextAlign.end) + : IPFormField( + help: "Required", + initialValue: _nebulaIp, + ipOnly: true, + textAlign: TextAlign.end, + crossAxisAlignment: CrossAxisAlignment.end, + textInputAction: TextInputAction.next, + onSaved: (v) { + if (v != null) { + _nebulaIp = v; + } + })), ConfigItem( label: Text('Lighthouse'), labelWidth: 200, @@ -96,12 +100,14 @@ class _StaticHostmapScreenState extends State { child: Switch.adaptive( value: _lighthouse, materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, - onChanged: widget.onSave == null ? null : (v) { - setState(() { - changed = true; - _lighthouse = v; - }); - })), + onChanged: widget.onSave == null + ? null + : (v) { + setState(() { + changed = true; + _lighthouse = v; + }); + })), ), ]), ConfigSection( @@ -128,8 +134,7 @@ class _StaticHostmapScreenState extends State { _onSave() { Navigator.pop(context); if (widget.onSave != null) { - var map = Hostmap( - nebulaIp: _nebulaIp, destinations: [], lighthouse: _lighthouse); + var map = Hostmap(nebulaIp: _nebulaIp, destinations: [], lighthouse: _lighthouse); _destinations.forEach((_, dest) { map.destinations.add(dest.destination); @@ -147,30 +152,32 @@ class _StaticHostmapScreenState extends State { key: key, label: Align( alignment: Alignment.centerLeft, - child: widget.onSave == null ? Container() : PlatformIconButton( - padding: EdgeInsets.zero, - icon: Icon(Icons.remove_circle, color: CupertinoColors.systemRed.resolveFrom(context)), - onPressed: () => setState(() { - _removeDestination(key); - _dismissKeyboard(); - }))), + child: widget.onSave == null + ? Container() + : PlatformIconButton( + padding: EdgeInsets.zero, + icon: Icon(Icons.remove_circle, color: CupertinoColors.systemRed.resolveFrom(context)), + onPressed: () => setState(() { + _removeDestination(key); + _dismissKeyboard(); + }))), labelWidth: 70, content: Row(children: [ Expanded( - child: widget.onSave == null ? - Text(dest.destination.toString(), textAlign: TextAlign.end) : - IPAndPortFormField( - ipHelp: 'public ip or name', - ipTextAlign: TextAlign.end, - enableIPV6: true, - noBorder: true, - initialValue: dest.destination, - onSaved: (v) { - if (v != null) { - dest.destination = v; - } - }, - )), + child: widget.onSave == null + ? Text(dest.destination.toString(), textAlign: TextAlign.end) + : IPAndPortFormField( + ipHelp: 'public ip or name', + ipTextAlign: TextAlign.end, + enableIPV6: true, + noBorder: true, + initialValue: dest.destination, + onSaved: (v) { + if (v != null) { + dest.destination = v; + } + }, + )), ]), )); }); @@ -178,8 +185,7 @@ class _StaticHostmapScreenState extends State { if (widget.onSave != null) { items.add(ConfigButtonItem( content: Text('Add another'), - onPressed: () => - setState(() { + onPressed: () => setState(() { _addDestination(); _dismissKeyboard(); }))); diff --git a/lib/screens/siteConfig/StaticHostsScreen.dart b/lib/screens/siteConfig/StaticHostsScreen.dart index c77f39c2..f9a5ea57 100644 --- a/lib/screens/siteConfig/StaticHostsScreen.dart +++ b/lib/screens/siteConfig/StaticHostsScreen.dart @@ -70,8 +70,7 @@ class _StaticHostsScreenState extends State { if (widget.onSave != null) { Map map = {}; _hostmap.forEach((_, host) { - map[host.nebulaIp] = StaticHost( - destinations: host.destinations, lighthouse: host.lighthouse); + map[host.nebulaIp] = StaticHost(destinations: host.destinations, lighthouse: host.lighthouse); }); widget.onSave!(map); @@ -98,20 +97,24 @@ class _StaticHostsScreenState extends State { nebulaIp: host.nebulaIp, destinations: host.destinations, lighthouse: host.lighthouse, - onSave: widget.onSave == null ? null :(map) { - setState(() { - changed = true; - host.nebulaIp = map.nebulaIp; - host.destinations = map.destinations; - host.lighthouse = map.lighthouse; - }); - }, - onDelete: widget.onSave == null ? null : () { - setState(() { - changed = true; - _hostmap.remove(key); - }); - }); + onSave: widget.onSave == null + ? null + : (map) { + setState(() { + changed = true; + host.nebulaIp = map.nebulaIp; + host.destinations = map.destinations; + host.lighthouse = map.lighthouse; + }); + }, + onDelete: widget.onSave == null + ? null + : () { + setState(() { + changed = true; + _hostmap.remove(key); + }); + }); }); }, )); diff --git a/lib/services/share.dart b/lib/services/share.dart index 7707aa32..23f6a4ff 100644 --- a/lib/services/share.dart +++ b/lib/services/share.dart @@ -41,9 +41,7 @@ class Share { /// - filePath: Path to the file to share /// - filename: An optional filename to override the existing file static Future shareFile(BuildContext context, - {required String title, - required String filePath, - String? filename}) async { + {required String title, required String filePath, String? filename}) async { assert(title.isNotEmpty); assert(filePath.isNotEmpty); @@ -54,8 +52,7 @@ class Share { // and then delete it final xFile = sp.XFile(filePath, name: filename); final result = await sp.Share.shareXFiles([xFile], - subject: title, - sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size); + subject: title, sharePositionOrigin: box!.localToGlobal(Offset.zero) & box.size); return result.status == sp.ShareResultStatus.success; } } From 428ecbdc3dd99b6fdf9d0a5e806ec7198e6d0971 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 14:59:18 -0400 Subject: [PATCH 06/36] Remove dead/unused code --- lib/screens/EnrollmentScreen.dart | 3 --- lib/screens/MainScreen.dart | 5 ----- lib/screens/SettingsScreen.dart | 3 --- lib/validators/ipValidator.dart | 1 - 4 files changed, 12 deletions(-) diff --git a/lib/screens/EnrollmentScreen.dart b/lib/screens/EnrollmentScreen.dart index 7d494bea..cbe91fd6 100644 --- a/lib/screens/EnrollmentScreen.dart +++ b/lib/screens/EnrollmentScreen.dart @@ -4,7 +4,6 @@ import 'package:flutter/gestures.dart'; import 'package:flutter/material.dart'; import 'package:flutter/services.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; -import 'package:flutter_svg/svg.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:url_launcher/url_launcher.dart'; @@ -152,8 +151,6 @@ class _EnrollmentScreenState extends State { ])); } - final dnIcon = - Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; return SimplePage( title: Text('Enroll with Managed Nebula', style: TextStyle(fontWeight: FontWeight.bold)), child: Padding(child: child, padding: EdgeInsets.symmetric(horizontal: 10)), diff --git a/lib/screens/MainScreen.dart b/lib/screens/MainScreen.dart index 728018c6..d4d70eff 100644 --- a/lib/screens/MainScreen.dart +++ b/lib/screens/MainScreen.dart @@ -14,7 +14,6 @@ import 'package:mobile_nebula/models/IPAndPort.dart'; import 'package:mobile_nebula/models/Site.dart'; import 'package:mobile_nebula/models/StaticHosts.dart'; import 'package:mobile_nebula/models/UnsafeRoute.dart'; -import 'package:mobile_nebula/screens/EnrollmentScreen.dart'; import 'package:mobile_nebula/screens/SettingsScreen.dart'; import 'package:mobile_nebula/screens/SiteDetailScreen.dart'; import 'package:mobile_nebula/screens/siteConfig/SiteConfigScreen.dart'; @@ -303,15 +302,11 @@ class _MainScreenState extends State { _loadSites() async { //TODO: This can throw, we need to show an error dialog Map rawSites = jsonDecode(await platform.invokeMethod('listSites')); - bool hasErrors = false; sites = []; rawSites.forEach((id, rawSite) { try { var site = Site.fromJson(rawSite); - if (site.errors.length > 0) { - hasErrors = true; - } //TODO: we need to cancel change listeners when we rebuild site.onChange().listen((_) { diff --git a/lib/screens/SettingsScreen.dart b/lib/screens/SettingsScreen.dart index 50cfa0e5..dd35bcdc 100644 --- a/lib/screens/SettingsScreen.dart +++ b/lib/screens/SettingsScreen.dart @@ -1,7 +1,6 @@ import 'dart:async'; import 'package:flutter/material.dart'; -import 'package:flutter_svg/svg.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; import 'package:mobile_nebula/components/config/ConfigItem.dart'; import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; @@ -86,8 +85,6 @@ class _SettingsScreenState extends State { )), )); - final dnIcon = - Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg'; items.add(ConfigSection(children: [ ConfigPageItem( label: Text('Enroll with Managed Nebula'), diff --git a/lib/validators/ipValidator.dart b/lib/validators/ipValidator.dart index 50959d0e..229bfb81 100644 --- a/lib/validators/ipValidator.dart +++ b/lib/validators/ipValidator.dart @@ -23,7 +23,6 @@ bool ipValidator(String? str, bool enableIPV6) { { return true; } - break; } return false; From 097199c4f12781e24006ad41fa1d2dafd20288d3 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 14:59:32 -0400 Subject: [PATCH 07/36] Replace deprecated canLaunch and launch --- lib/services/utils.dart | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/services/utils.dart b/lib/services/utils.dart index 40ce3172..a5625bb5 100644 --- a/lib/services/utils.dart +++ b/lib/services/utils.dart @@ -4,7 +4,7 @@ import 'package:file_picker/file_picker.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; import 'package:flutter_platform_widgets/flutter_platform_widgets.dart'; -import 'package:url_launcher/url_launcher.dart'; +import 'package:url_launcher/url_launcher_string.dart'; class Utils { /// Minimum size (width or height) of a interactive component @@ -158,8 +158,8 @@ class Utils { } static launchUrl(String url, BuildContext context) async { - if (await canLaunch(url)) { - await launch(url); + if (await canLaunchUrlString(url)) { + await launchUrlString(url); } else { Utils.popError(context, 'Error', 'Could not launch web view'); } From f25d6374c24b2a4d120bfbc13ec8f66da930c944 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 15:07:41 -0400 Subject: [PATCH 08/36] Update flutter to 3.7.12 --- pubspec.lock | 198 +++++++++++++++++++++++++++++++++------------------ 1 file changed, 128 insertions(+), 70 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index df2e7624..42b97b89 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,84 +5,96 @@ packages: dependency: transitive description: name: async - url: "https://pub.dartlang.org" + sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + url: "https://pub.dev" source: hosted - version: "2.9.0" + version: "2.10.0" boolean_selector: dependency: transitive description: name: boolean_selector - url: "https://pub.dartlang.org" + sha256: "6cfb5af12253eaf2b368f07bacc5a80d1301a071c73360d746b7f2e32d762c66" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" characters: dependency: transitive description: name: characters - url: "https://pub.dartlang.org" + sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + url: "https://pub.dev" source: hosted version: "1.2.1" clock: dependency: transitive description: name: clock - url: "https://pub.dartlang.org" + sha256: cb6d7f03e1de671e34607e909a7213e31d7752be4fb66a86d29fe1eb14bfb5cf + url: "https://pub.dev" source: hosted version: "1.1.1" collection: dependency: transitive description: name: collection - url: "https://pub.dartlang.org" + sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + url: "https://pub.dev" source: hosted - version: "1.16.0" + version: "1.17.0" cross_file: dependency: transitive description: name: cross_file - url: "https://pub.dartlang.org" + sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + url: "https://pub.dev" source: hosted version: "0.3.3+4" crypto: dependency: transitive description: name: crypto - url: "https://pub.dartlang.org" + sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + url: "https://pub.dev" source: hosted version: "3.0.2" cupertino_icons: dependency: "direct main" description: name: cupertino_icons - url: "https://pub.dartlang.org" + sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + url: "https://pub.dev" source: hosted version: "1.0.5" fake_async: dependency: transitive description: name: fake_async - url: "https://pub.dartlang.org" + sha256: "511392330127add0b769b75a987850d136345d9227c6b94c96a04cf4a391bf78" + url: "https://pub.dev" source: hosted version: "1.3.1" ffi: dependency: transitive description: name: ffi - url: "https://pub.dartlang.org" + sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + url: "https://pub.dev" source: hosted version: "2.0.2" file: dependency: transitive description: name: file - url: "https://pub.dartlang.org" + sha256: "1b92bec4fc2a72f59a8e15af5f52cd441e4a7860b49499d69dfa817af20e925d" + url: "https://pub.dev" source: hosted version: "6.1.4" file_picker: dependency: "direct main" description: name: file_picker - url: "https://pub.dartlang.org" + sha256: b85eb92b175767fdaa0c543bf3b0d1f610fe966412ea72845fe5ba7801e763ff + url: "https://pub.dev" source: hosted version: "5.2.10" flutter: @@ -94,28 +106,32 @@ packages: dependency: "direct main" description: name: flutter_barcode_scanner - url: "https://pub.dartlang.org" + sha256: a4ba37daf9933f451a5e812c753ddd045d6354e4a3280342d895b07fecaab3fa + url: "https://pub.dev" source: hosted version: "2.0.0" flutter_platform_widgets: dependency: "direct main" description: name: flutter_platform_widgets - url: "https://pub.dartlang.org" + sha256: "04a373ebf654162791bfce4b7c157f48ec35ea8b0abe2a68de837ceda8bd39ff" + url: "https://pub.dev" source: hosted version: "2.2.6" flutter_plugin_android_lifecycle: dependency: transitive description: name: flutter_plugin_android_lifecycle - url: "https://pub.dartlang.org" + sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" + url: "https://pub.dev" source: hosted version: "2.0.15" flutter_svg: dependency: "direct main" description: name: flutter_svg - url: "https://pub.dartlang.org" + sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" + url: "https://pub.dev" source: hosted version: "1.1.6" flutter_test: @@ -132,154 +148,176 @@ packages: dependency: "direct main" description: name: intl - url: "https://pub.dartlang.org" + sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + url: "https://pub.dev" source: hosted version: "0.17.0" js: dependency: transitive description: name: js - url: "https://pub.dartlang.org" + sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + url: "https://pub.dev" source: hosted - version: "0.6.4" + version: "0.6.5" matcher: dependency: transitive description: name: matcher - url: "https://pub.dartlang.org" + sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + url: "https://pub.dev" source: hosted - version: "0.12.12" + version: "0.12.13" material_color_utilities: dependency: transitive description: name: material_color_utilities - url: "https://pub.dartlang.org" + sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + url: "https://pub.dev" source: hosted - version: "0.1.5" + version: "0.2.0" meta: dependency: transitive description: name: meta - url: "https://pub.dartlang.org" + sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + url: "https://pub.dev" source: hosted version: "1.8.0" mime: dependency: transitive description: name: mime - url: "https://pub.dartlang.org" + sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + url: "https://pub.dev" source: hosted version: "1.0.4" package_info: dependency: "direct main" description: name: package_info - url: "https://pub.dartlang.org" + sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" + url: "https://pub.dev" source: hosted version: "2.0.2" path: dependency: transitive description: name: path - url: "https://pub.dartlang.org" + sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + url: "https://pub.dev" source: hosted version: "1.8.2" path_drawing: dependency: transitive description: name: path_drawing - url: "https://pub.dartlang.org" + sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 + url: "https://pub.dev" source: hosted version: "1.0.1" path_parsing: dependency: transitive description: name: path_parsing - url: "https://pub.dartlang.org" + sha256: e3e67b1629e6f7e8100b367d3db6ba6af4b1f0bb80f64db18ef1fbabd2fa9ccf + url: "https://pub.dev" source: hosted version: "1.0.1" path_provider: dependency: "direct main" description: name: path_provider - url: "https://pub.dartlang.org" + sha256: "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0" + url: "https://pub.dev" source: hosted version: "2.1.0" path_provider_android: dependency: transitive description: name: path_provider_android - url: "https://pub.dartlang.org" + sha256: "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8" + url: "https://pub.dev" source: hosted version: "2.1.0" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - url: "https://pub.dartlang.org" + sha256: "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5" + url: "https://pub.dev" source: hosted version: "2.3.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - url: "https://pub.dartlang.org" + sha256: ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3 + url: "https://pub.dev" source: hosted version: "2.2.0" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - url: "https://pub.dartlang.org" + sha256: bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84 + url: "https://pub.dev" source: hosted version: "2.1.0" path_provider_windows: dependency: transitive description: name: path_provider_windows - url: "https://pub.dartlang.org" + sha256: ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da + url: "https://pub.dev" source: hosted version: "2.2.0" petitparser: dependency: transitive description: name: petitparser - url: "https://pub.dartlang.org" + sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + url: "https://pub.dev" source: hosted version: "5.1.0" platform: dependency: transitive description: name: platform - url: "https://pub.dartlang.org" + sha256: "57c07bf82207aee366dfaa3867b3164e4f03a238a461a11b0e8a3a510d51203d" + url: "https://pub.dev" source: hosted version: "3.1.1" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - url: "https://pub.dartlang.org" + sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + url: "https://pub.dev" source: hosted version: "2.1.5" pull_to_refresh: dependency: "direct main" description: name: pull_to_refresh - url: "https://pub.dartlang.org" + sha256: bbadd5a931837b57739cf08736bea63167e284e71fb23b218c8c9a6e042aad12 + url: "https://pub.dev" source: hosted version: "2.0.0" share_plus: dependency: "direct main" description: name: share_plus - url: "https://pub.dartlang.org" + sha256: b1f15232d41e9701ab2f04181f21610c36c83a12ae426b79b4bd011c567934b1 + url: "https://pub.dev" source: hosted version: "6.3.4" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - url: "https://pub.dartlang.org" + sha256: df08bc3a07d01f5ea47b45d03ffcba1fa9cd5370fb44b3f38c70e42cced0f956 + url: "https://pub.dev" source: hosted version: "3.3.1" sky_engine: @@ -291,140 +329,160 @@ packages: dependency: transitive description: name: source_span - url: "https://pub.dartlang.org" + sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + url: "https://pub.dev" source: hosted - version: "1.9.0" + version: "1.9.1" stack_trace: dependency: transitive description: name: stack_trace - url: "https://pub.dartlang.org" + sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" stream_channel: dependency: transitive description: name: stream_channel - url: "https://pub.dartlang.org" + sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.1" string_scanner: dependency: transitive description: name: string_scanner - url: "https://pub.dartlang.org" + sha256: "556692adab6cfa87322a115640c11f13cb77b3f076ddcc5d6ae3c20242bedcde" + url: "https://pub.dev" source: hosted - version: "1.1.1" + version: "1.2.0" term_glyph: dependency: transitive description: name: term_glyph - url: "https://pub.dartlang.org" + sha256: a29248a84fbb7c79282b40b8c72a1209db169a2e0542bce341da992fe1bc7e84 + url: "https://pub.dev" source: hosted version: "1.2.1" test_api: dependency: transitive description: name: test_api - url: "https://pub.dartlang.org" + sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + url: "https://pub.dev" source: hosted - version: "0.4.12" + version: "0.4.16" typed_data: dependency: transitive description: name: typed_data - url: "https://pub.dartlang.org" + sha256: facc8d6582f16042dd49f2463ff1bd6e2c9ef9f3d5da3d9b087e244a7b564b3c + url: "https://pub.dev" source: hosted version: "1.3.2" url_launcher: dependency: "direct main" description: name: url_launcher - url: "https://pub.dartlang.org" + sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + url: "https://pub.dev" source: hosted version: "6.1.11" url_launcher_android: dependency: transitive description: name: url_launcher_android - url: "https://pub.dartlang.org" + sha256: "3dd2388cc0c42912eee04434531a26a82512b9cb1827e0214430c9bcbddfe025" + url: "https://pub.dev" source: hosted version: "6.0.38" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - url: "https://pub.dartlang.org" + sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + url: "https://pub.dev" source: hosted version: "6.1.4" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - url: "https://pub.dartlang.org" + sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + url: "https://pub.dev" source: hosted version: "3.0.5" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - url: "https://pub.dartlang.org" + sha256: "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1" + url: "https://pub.dev" source: hosted version: "3.0.6" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - url: "https://pub.dartlang.org" + sha256: bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea + url: "https://pub.dev" source: hosted version: "2.1.3" url_launcher_web: dependency: transitive description: name: url_launcher_web - url: "https://pub.dartlang.org" + sha256: cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4 + url: "https://pub.dev" source: hosted version: "2.0.18" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - url: "https://pub.dartlang.org" + sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422" + url: "https://pub.dev" source: hosted version: "3.0.7" uuid: dependency: "direct main" description: name: uuid - url: "https://pub.dartlang.org" + sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + url: "https://pub.dev" source: hosted version: "3.0.7" vector_math: dependency: transitive description: name: vector_math - url: "https://pub.dartlang.org" + sha256: "80b3257d1492ce4d091729e3a67a60407d227c27241d6927be0130c98e741803" + url: "https://pub.dev" source: hosted - version: "2.1.2" + version: "2.1.4" win32: dependency: transitive description: name: win32 - url: "https://pub.dartlang.org" + sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 + url: "https://pub.dev" source: hosted version: "3.1.4" xdg_directories: dependency: transitive description: name: xdg_directories - url: "https://pub.dartlang.org" + sha256: f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247 + url: "https://pub.dev" source: hosted version: "1.0.2" xml: dependency: transitive description: name: xml - url: "https://pub.dartlang.org" + sha256: ac0e3f4bf00ba2708c33fbabbbe766300e509f8c82dbd4ab6525039813f7e2fb + url: "https://pub.dev" source: hosted version: "6.1.0" sdks: From cec7351f8253570f5e0b5f7806c2d04b84ea6714 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 15:08:00 -0400 Subject: [PATCH 09/36] Replace deprecated theme properties --- lib/components/SpecialButton.dart | 2 +- lib/components/config/ConfigHeader.dart | 2 +- lib/components/config/ConfigPageItem.dart | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/components/SpecialButton.dart b/lib/components/SpecialButton.dart index 79154183..fd97affd 100644 --- a/lib/components/SpecialButton.dart +++ b/lib/components/SpecialButton.dart @@ -28,7 +28,7 @@ class _SpecialButtonState extends State with SingleTickerProvider Widget _buildAndroid() { var textStyle; if (widget.useButtonTheme) { - textStyle = Theme.of(context).textTheme.button; + textStyle = Theme.of(context).textTheme.labelLarge; } return Material( diff --git a/lib/components/config/ConfigHeader.dart b/lib/components/config/ConfigHeader.dart index 5e5389ea..bcb9c093 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.subtitle1!; + Platform.isIOS ? CupertinoTheme.of(context).textTheme.textStyle : Theme.of(context).textTheme.titleMedium!; const double _headerFontSize = 13.0; diff --git a/lib/components/config/ConfigPageItem.dart b/lib/components/config/ConfigPageItem.dart index 067a1d35..e7c01490 100644 --- a/lib/components/config/ConfigPageItem.dart +++ b/lib/components/config/ConfigPageItem.dart @@ -31,7 +31,7 @@ class ConfigPageItem extends StatelessWidget { final origTheme = Theme.of(context); theme = origTheme.copyWith( textTheme: origTheme.textTheme - .copyWith(button: origTheme.textTheme.button!.copyWith(fontWeight: FontWeight.normal))); + .copyWith(labelLarge: origTheme.textTheme.labelLarge!.copyWith(fontWeight: FontWeight.normal))); return Theme(data: theme, child: _buildContent(context)); } else { final origTheme = CupertinoTheme.of(context); From 188a8f8e4b2439c3f4d37d24b061b030f2b030d1 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 15:27:46 -0400 Subject: [PATCH 10/36] Update to flutter 3.10.7 --- pubspec.lock | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 42b97b89..e55db09b 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -5,10 +5,10 @@ packages: dependency: transitive description: name: async - sha256: bfe67ef28df125b7dddcea62755991f807aa39a2492a23e1550161692950bbe0 + sha256: "947bfcf187f74dbc5e146c9eb9c0f10c9f8b30743e341481c1e2ed3ecc18c20c" url: "https://pub.dev" source: hosted - version: "2.10.0" + version: "2.11.0" boolean_selector: dependency: transitive description: @@ -21,10 +21,10 @@ packages: dependency: transitive description: name: characters - sha256: e6a326c8af69605aec75ed6c187d06b349707a27fbff8222ca9cc2cff167975c + sha256: "04a925763edad70e8443c99234dc3328f442e811f1d8fd1a72f1c8ad0f69a605" url: "https://pub.dev" source: hosted - version: "1.2.1" + version: "1.3.0" clock: dependency: transitive description: @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: cfc915e6923fe5ce6e153b0723c753045de46de1b4d63771530504004a45fae0 + sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" url: "https://pub.dev" source: hosted - version: "1.17.0" + version: "1.17.1" cross_file: dependency: transitive description: @@ -156,18 +156,18 @@ packages: dependency: transitive description: name: js - sha256: "5528c2f391ededb7775ec1daa69e65a2d61276f7552de2b5f7b8d34ee9fd4ab7" + sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 url: "https://pub.dev" source: hosted - version: "0.6.5" + version: "0.6.7" matcher: dependency: transitive description: name: matcher - sha256: "16db949ceee371e9b99d22f88fa3a73c4e59fd0afed0bd25fc336eb76c198b72" + sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" url: "https://pub.dev" source: hosted - version: "0.12.13" + version: "0.12.15" material_color_utilities: dependency: transitive description: @@ -180,10 +180,10 @@ packages: dependency: transitive description: name: meta - sha256: "6c268b42ed578a53088d834796959e4a1814b5e9e164f147f580a386e5decf42" + sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" url: "https://pub.dev" source: hosted - version: "1.8.0" + version: "1.9.1" mime: dependency: transitive description: @@ -204,10 +204,10 @@ packages: dependency: transitive description: name: path - sha256: db9d4f58c908a4ba5953fcee2ae317c94889433e5024c27ce74a37f94267945b + sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" url: "https://pub.dev" source: hosted - version: "1.8.2" + version: "1.8.3" path_drawing: dependency: transitive description: @@ -369,10 +369,10 @@ packages: dependency: transitive description: name: test_api - sha256: ad540f65f92caa91bf21dfc8ffb8c589d6e4dc0c2267818b4cc2792857706206 + sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb url: "https://pub.dev" source: hosted - version: "0.4.16" + version: "0.5.1" typed_data: dependency: transitive description: @@ -486,5 +486,5 @@ packages: source: hosted version: "6.1.0" sdks: - dart: ">=2.18.1 <3.0.0" + dart: ">=3.0.0-0 <4.0.0" flutter: ">=3.3.0" From 98a0818db212ff1cdf6de3a351c3de0716d063ed Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 15:28:17 -0400 Subject: [PATCH 11/36] Avoid deprecated window property --- lib/main.dart | 2 +- lib/services/settings.dart | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index b051cba8..7adef60e 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -32,7 +32,7 @@ class App extends StatefulWidget { class _AppState extends State { final settings = Settings(); - Brightness brightness = SchedulerBinding.instance.window.platformBrightness; + Brightness brightness = SchedulerBinding.instance.platformDispatcher.platformBrightness; StreamController dnEnrolled = StreamController.broadcast(); @override diff --git a/lib/services/settings.dart b/lib/services/settings.dart index 0f2bb39b..d4d47427 100644 --- a/lib/services/settings.dart +++ b/lib/services/settings.dart @@ -22,7 +22,7 @@ class Settings { } bool get darkMode { - return _getBool('darkMode', SchedulerBinding.instance.window.platformBrightness == Brightness.dark); + return _getBool('darkMode', SchedulerBinding.instance.platformDispatcher.platformBrightness == Brightness.dark); } set darkMode(bool enabled) { From 0e329ff92b58f9b52db5ba9fba1aceb27f2602e8 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 15:28:28 -0400 Subject: [PATCH 12/36] Remove unused method --- lib/services/settings.dart | 8 -------- 1 file changed, 8 deletions(-) diff --git a/lib/services/settings.dart b/lib/services/settings.dart index d4d47427..14f5bc30 100644 --- a/lib/services/settings.dart +++ b/lib/services/settings.dart @@ -37,14 +37,6 @@ class Settings { _set('logWrap', enabled); } - String _getString(String key, String defaultValue) { - final val = _settings[key]; - if (val is String) { - return val; - } - return defaultValue; - } - bool _getBool(String key, bool defaultValue) { final val = _settings[key]; if (val is bool) { From 70d5a0fb2b8cdb6623d9f948b9b29143708dc5b4 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 16:18:37 -0400 Subject: [PATCH 13/36] Use supported version of flutter_platform_widgets --- pubspec.lock | 6 +++--- pubspec.yaml | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index e55db09b..67dd53d4 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -114,10 +114,10 @@ packages: dependency: "direct main" description: name: flutter_platform_widgets - sha256: "04a373ebf654162791bfce4b7c157f48ec35ea8b0abe2a68de837ceda8bd39ff" + sha256: "3fd50bed23d4e17548d36d4597de07959d010288bdbf31e105cdd583a9de4b26" url: "https://pub.dev" source: hosted - version: "2.2.6" + version: "4.0.0-beta.2" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -487,4 +487,4 @@ packages: version: "6.1.0" sdks: dart: ">=3.0.0-0 <4.0.0" - flutter: ">=3.3.0" + flutter: ">=3.10.0" diff --git a/pubspec.yaml b/pubspec.yaml index c6db6ec0..d685f602 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - flutter_platform_widgets: ^2.0.0 + flutter_platform_widgets: 4.0.0-beta.2 path_provider: ^2.0.11 file_picker: ^5.0.1 uuid: ^3.0.4 From 1bf62b8f0377c08d6a737481d991505aee9b4094 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 28 Aug 2024 16:25:19 -0400 Subject: [PATCH 14/36] Update flutter to 3.13.9 --- pubspec.lock | 40 ++++++++++++++++++++++++---------------- pubspec.yaml | 2 +- 2 files changed, 25 insertions(+), 17 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 67dd53d4..548dce66 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c" + sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 url: "https://pub.dev" source: hosted - version: "1.17.1" + version: "1.17.2" cross_file: dependency: transitive description: @@ -61,10 +61,10 @@ packages: dependency: "direct main" description: name: cupertino_icons - sha256: e35129dc44c9118cee2a5603506d823bab99c68393879edb440e0090d07586be + sha256: ba631d1c7f7bef6b729a622b7b752645a2d076dba9976925b8f25725a30e1ee6 url: "https://pub.dev" source: hosted - version: "1.0.5" + version: "1.0.8" fake_async: dependency: transitive description: @@ -114,10 +114,10 @@ packages: dependency: "direct main" description: name: flutter_platform_widgets - sha256: "3fd50bed23d4e17548d36d4597de07959d010288bdbf31e105cdd583a9de4b26" + sha256: "4e29d811af1814a49f03bf9ef6638ebda45fd7d63cb09e64925adda153041e28" url: "https://pub.dev" source: hosted - version: "4.0.0-beta.2" + version: "5.0.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -164,18 +164,18 @@ packages: dependency: transitive description: name: matcher - sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb" + sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" url: "https://pub.dev" source: hosted - version: "0.12.15" + version: "0.12.16" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724 + sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" url: "https://pub.dev" source: hosted - version: "0.2.0" + version: "0.5.0" meta: dependency: transitive description: @@ -329,10 +329,10 @@ packages: dependency: transitive description: name: source_span - sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250 + sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c" url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" stack_trace: dependency: transitive description: @@ -369,10 +369,10 @@ packages: dependency: transitive description: name: test_api - sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb + sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "0.6.0" typed_data: dependency: transitive description: @@ -461,6 +461,14 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + web: + dependency: transitive + description: + name: web + sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + url: "https://pub.dev" + source: hosted + version: "0.1.4-beta" win32: dependency: transitive description: @@ -486,5 +494,5 @@ packages: source: hosted version: "6.1.0" sdks: - dart: ">=3.0.0-0 <4.0.0" - flutter: ">=3.10.0" + dart: ">=3.1.0 <4.0.0" + flutter: ">=3.13.0" diff --git a/pubspec.yaml b/pubspec.yaml index d685f602..d6ca7433 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - flutter_platform_widgets: 4.0.0-beta.2 + flutter_platform_widgets: 5.0.0 path_provider: ^2.0.11 file_picker: ^5.0.1 uuid: ^3.0.4 From b0e1ed4f2cf4fc6c0180263648e621537b556025 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 29 Aug 2024 08:20:58 -0400 Subject: [PATCH 15/36] Update to flutter 3.16.8 --- pubspec.lock | 32 ++++++++++++++++---------------- pubspec.yaml | 2 +- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 548dce66..e01f4bb5 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -37,10 +37,10 @@ packages: dependency: transitive description: name: collection - sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687 + sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a url: "https://pub.dev" source: hosted - version: "1.17.2" + version: "1.18.0" cross_file: dependency: transitive description: @@ -114,10 +114,10 @@ packages: dependency: "direct main" description: name: flutter_platform_widgets - sha256: "4e29d811af1814a49f03bf9ef6638ebda45fd7d63cb09e64925adda153041e28" + sha256: c483c0591d845d2adb84e341a1cfb746f1a8a7aff4c72a5957772446020601f4 url: "https://pub.dev" source: hosted - version: "5.0.0" + version: "6.1.0" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -180,10 +180,10 @@ packages: dependency: transitive description: name: meta - sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3" + sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e url: "https://pub.dev" source: hosted - version: "1.9.1" + version: "1.10.0" mime: dependency: transitive description: @@ -337,18 +337,18 @@ packages: dependency: transitive description: name: stack_trace - sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5 + sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b" url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.11.1" stream_channel: dependency: transitive description: name: stream_channel - sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8" + sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7 url: "https://pub.dev" source: hosted - version: "2.1.1" + version: "2.1.2" string_scanner: dependency: transitive description: @@ -369,10 +369,10 @@ packages: dependency: transitive description: name: test_api - sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8" + sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" url: "https://pub.dev" source: hosted - version: "0.6.0" + version: "0.6.1" typed_data: dependency: transitive description: @@ -465,10 +465,10 @@ packages: dependency: transitive description: name: web - sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10 + sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 url: "https://pub.dev" source: hosted - version: "0.1.4-beta" + version: "0.3.0" win32: dependency: transitive description: @@ -494,5 +494,5 @@ packages: source: hosted version: "6.1.0" sdks: - dart: ">=3.1.0 <4.0.0" - flutter: ">=3.13.0" + dart: ">=3.2.0-194.0.dev <4.0.0" + flutter: ">=3.16.0" diff --git a/pubspec.yaml b/pubspec.yaml index d6ca7433..70ac52cf 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,7 +23,7 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - flutter_platform_widgets: 5.0.0 + flutter_platform_widgets: 6.1.0 path_provider: ^2.0.11 file_picker: ^5.0.1 uuid: ^3.0.4 From 8e5deb94e87671b6e27421be1fdfd49be6948f6c Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 29 Aug 2024 08:21:20 -0400 Subject: [PATCH 16/36] Handle nullable vs nonnullable mismatch --- lib/components/SpecialTextField.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/SpecialTextField.dart b/lib/components/SpecialTextField.dart index 1e09a6fc..54ddf45a 100644 --- a/lib/components/SpecialTextField.dart +++ b/lib/components/SpecialTextField.dart @@ -90,7 +90,7 @@ class _SpecialTextFieldState extends State { autofocus: widget.autofocus, focusNode: widget.focusNode, onChanged: widget.onChanged, - enabled: widget.enabled, + enabled: widget.enabled ?? false, // TODO: maybe there's a better way to do this? widget.enabled is nullable, should it be? onSubmitted: (_) { if (widget.nextFocusNode != null) { FocusScope.of(context).requestFocus(widget.nextFocusNode); From 4eea96e73f9bc02667d0e3ce0ec78368af88e9dd Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 29 Aug 2024 08:21:31 -0400 Subject: [PATCH 17/36] Disable material 13 for now --- lib/main.dart | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/main.dart b/lib/main.dart index 7adef60e..449da334 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -58,6 +58,7 @@ class _AppState extends State { @override Widget build(BuildContext context) { final ThemeData lightTheme = ThemeData( + useMaterial3: false, brightness: Brightness.light, primarySwatch: Colors.blueGrey, primaryColor: Colors.blueGrey[900], @@ -70,6 +71,7 @@ class _AppState extends State { ); final ThemeData darkTheme = ThemeData( + useMaterial3: false, brightness: Brightness.dark, primarySwatch: Colors.grey, primaryColor: Colors.grey[900], From 8721123d6e45e0f9ca69155197a52c24dc24cd5a Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 29 Aug 2024 09:41:10 -0400 Subject: [PATCH 18/36] Remove package attribute from manifests Now that we've gotten to a new enough version of flutter that it doesn't break --- android/app/src/debug/AndroidManifest.xml | 3 +-- android/app/src/main/AndroidManifest.xml | 3 +-- android/app/src/profile/AndroidManifest.xml | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/android/app/src/debug/AndroidManifest.xml b/android/app/src/debug/AndroidManifest.xml index bc4f1bfd..f880684a 100644 --- a/android/app/src/debug/AndroidManifest.xml +++ b/android/app/src/debug/AndroidManifest.xml @@ -1,5 +1,4 @@ - + diff --git a/android/app/src/main/AndroidManifest.xml b/android/app/src/main/AndroidManifest.xml index 97599c55..8c780350 100644 --- a/android/app/src/main/AndroidManifest.xml +++ b/android/app/src/main/AndroidManifest.xml @@ -1,6 +1,5 @@ + xmlns:tools="http://schemas.android.com/tools"> From 47e005bdf8cdb73d194852252ebd5e7aae7913fa Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 29 Aug 2024 10:07:40 -0400 Subject: [PATCH 19/36] Avoid deprecated imperative apply of gradle plugins https://docs.flutter.dev/release/breaking-changes/flutter-gradle-plugin-apply --- android/app/build.gradle | 16 +++++++--------- android/build.gradle | 17 ----------------- android/settings.gradle | 30 ++++++++++++++++++++++-------- 3 files changed, 29 insertions(+), 34 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7f9a63a2..c60549d9 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -1,3 +1,9 @@ +plugins { + id "com.android.application" + id "kotlin-android" + id "dev.flutter.flutter-gradle-plugin" +} + def localProperties = new Properties() def localPropertiesFile = rootProject.file('local.properties') if (localPropertiesFile.exists()) { @@ -6,10 +12,6 @@ if (localPropertiesFile.exists()) { } } -def flutterRoot = localProperties.getProperty('flutter.sdk') -if (flutterRoot == null) { - throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.") -} def flutterVersionCode = localProperties.getProperty('flutter.versionCode') if (flutterVersionCode == null) { @@ -21,10 +23,6 @@ if (flutterVersionName == null) { flutterVersionName = '1.0' } -apply plugin: 'com.android.application' -apply plugin: 'kotlin-android' -apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle" - android { namespace "net.defined.mobile_nebula" @@ -80,7 +78,7 @@ flutter { } dependencies { - implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlinVersion" + def workVersion = "2.7.1" implementation "androidx.security:security-crypto:1.0.0" implementation "androidx.work:work-runtime-ktx:$workVersion" implementation 'com.google.code.gson:gson:2.8.9' diff --git a/android/build.gradle b/android/build.gradle index 80067ce6..bc157bd1 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -1,20 +1,3 @@ -buildscript { - ext { - workVersion = "2.7.1" - kotlinVersion = '1.7.20' - } - - repositories { - google() - mavenCentral() - } - - dependencies { - classpath 'com.android.tools.build:gradle:7.4.2' - classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlinVersion" - } -} - allprojects { repositories { google() diff --git a/android/settings.gradle b/android/settings.gradle index b99d5933..4806268a 100644 --- a/android/settings.gradle +++ b/android/settings.gradle @@ -1,11 +1,25 @@ -include ':app', ':mobileNebula' +pluginManagement { + def flutterSdkPath = { + def properties = new Properties() + file("local.properties").withInputStream { properties.load(it) } + def flutterSdkPath = properties.getProperty("flutter.sdk") + assert flutterSdkPath != null, "flutter.sdk not set in local.properties" + return flutterSdkPath + }() -def localPropertiesFile = new File(rootProject.projectDir, "local.properties") -def properties = new Properties() + includeBuild("$flutterSdkPath/packages/flutter_tools/gradle") -assert localPropertiesFile.exists() -localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) } + repositories { + google() + mavenCentral() + gradlePluginPortal() + } +} -def flutterSdkPath = properties.getProperty("flutter.sdk") -assert flutterSdkPath != null, "flutter.sdk not set in local.properties" -apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle" \ No newline at end of file +plugins { + id "dev.flutter.flutter-plugin-loader" version "1.0.0" + id "com.android.application" version "7.4.2" apply false + id "org.jetbrains.kotlin.android" version "1.7.20" apply false +} + +include ':app', ':mobileNebula' \ No newline at end of file From afd655f86dff84407eef073251ac1b0b4acaa9d6 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 29 Aug 2024 10:21:51 -0400 Subject: [PATCH 20/36] Support predictive back https://docs.flutter.dev/release/breaking-changes/android-predictive-back#migrating-a-back-confirmation-dialog --- lib/components/FormPage.dart | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) diff --git a/lib/components/FormPage.dart b/lib/components/FormPage.dart index 34094df7..9f41fd16 100644 --- a/lib/components/FormPage.dart +++ b/lib/components/FormPage.dart @@ -1,5 +1,3 @@ -import 'dart:async'; - import 'package:flutter/cupertino.dart'; import 'package:flutter/widgets.dart'; import 'package:mobile_nebula/components/SimplePage.dart'; @@ -40,19 +38,17 @@ class _FormPageState extends State { Widget build(BuildContext context) { changed = widget.changed || changed; - return WillPopScope( - onWillPop: () { - if (!changed) { - return Future.value(true); + return PopScope( + canPop: false, + onPopInvoked: (bool didPop) async { + if (didPop) { + return; } - - var completer = Completer(); + final NavigatorState navigator = Navigator.of(context); Utils.confirmDelete(context, 'Discard changes?', () { - completer.complete(true); + navigator.pop(); }, deleteLabel: 'Yes', cancelLabel: 'No'); - - return completer.future; }, child: SimplePage( leadingAction: _buildLeader(context), From eae5b31f189a5d7f6de670b1af4ea9649a5dfb87 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Thu, 29 Aug 2024 10:44:04 -0400 Subject: [PATCH 21/36] Update to flutter 3.19.0 --- README.md | 2 +- pubspec.lock | 156 +++++++++++++++++++++++++++++---------------------- 2 files changed, 91 insertions(+), 67 deletions(-) diff --git a/README.md b/README.md index a9d3eea6..e7a41681 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Install all of the following things: - [`xcode`](https://apps.apple.com/us/app/xcode/) - [`android-studio`](https://developer.android.com/studio) -- [`flutter` 3.3.5](https://docs.flutter.dev/get-started/install) +- [`flutter` 3.19.0](https://docs.flutter.dev/get-started/install) - [`gomobile`](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile) - [Flutter Android Studio Extension](https://docs.flutter.dev/get-started/editor?tab=androidstudio) diff --git a/pubspec.lock b/pubspec.lock index e01f4bb5..88e6dda7 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -45,18 +45,18 @@ packages: dependency: transitive description: name: cross_file - sha256: "0b0036e8cccbfbe0555fd83c1d31a6f30b77a96b598b35a5d36dd41f718695e9" + sha256: "7caf6a750a0c04effbb52a676dce9a4a592e10ad35c34d6d2d0e4811160d5670" url: "https://pub.dev" source: hosted - version: "0.3.3+4" + version: "0.3.4+2" crypto: dependency: transitive description: name: crypto - sha256: aa274aa7774f8964e4f4f38cc994db7b6158dd36e9187aaceaddc994b35c6c67 + sha256: ff625774173754681d66daaf4a448684fb04b78f902da9cb3d308c19cc5e8bab url: "https://pub.dev" source: hosted - version: "3.0.2" + version: "3.0.3" cupertino_icons: dependency: "direct main" description: @@ -77,10 +77,10 @@ packages: dependency: transitive description: name: ffi - sha256: ed5337a5660c506388a9f012be0288fb38b49020ce2b45fe1f8b8323fe429f99 + sha256: "16ed7b077ef01ad6170a3d0c57caa4a112a38d7a2ed5602e0aca9ca6f3d98da6" url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "2.1.3" file: dependency: transitive description: @@ -122,10 +122,10 @@ packages: dependency: transitive description: name: flutter_plugin_android_lifecycle - sha256: "950e77c2bbe1692bc0874fc7fb491b96a4dc340457f4ea1641443d0a6c1ea360" + sha256: "8cf40eebf5dec866a6d1956ad7b4f7016e6c0cc69847ab946833b7d43743809f" url: "https://pub.dev" source: hosted - version: "2.0.15" + version: "2.0.19" flutter_svg: dependency: "direct main" description: @@ -152,46 +152,62 @@ packages: url: "https://pub.dev" source: hosted version: "0.17.0" - js: + leak_tracker: dependency: transitive description: - name: js - sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3 + name: leak_tracker + sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" url: "https://pub.dev" source: hosted - version: "0.6.7" + version: "10.0.0" + leak_tracker_flutter_testing: + dependency: transitive + description: + name: leak_tracker_flutter_testing + sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + url: "https://pub.dev" + source: hosted + version: "2.0.1" + leak_tracker_testing: + dependency: transitive + description: + name: leak_tracker_testing + sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + url: "https://pub.dev" + source: hosted + version: "2.0.1" matcher: dependency: transitive description: name: matcher - sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e" + sha256: d2323aa2060500f906aa31a895b4030b6da3ebdcc5619d14ce1aada65cd161cb url: "https://pub.dev" source: hosted - version: "0.12.16" + version: "0.12.16+1" material_color_utilities: dependency: transitive description: name: material_color_utilities - sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41" + sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" url: "https://pub.dev" source: hosted - version: "0.5.0" + version: "0.8.0" meta: dependency: transitive description: name: meta - sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e + sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 url: "https://pub.dev" source: hosted - version: "1.10.0" + version: "1.11.0" mime: dependency: transitive description: name: mime - sha256: e4ff8e8564c03f255408decd16e7899da1733852a9110a58fe6d1b817684a63e + sha256: "801fd0b26f14a4a58ccb09d5892c3fbdeff209594300a542492cf13fba9d247a" url: "https://pub.dev" source: hosted - version: "1.0.4" + version: "1.0.6" package_info: dependency: "direct main" description: @@ -204,10 +220,10 @@ packages: dependency: transitive description: name: path - sha256: "8829d8a55c13fc0e37127c29fedf290c102f4e40ae94ada574091fe0ff96c917" + sha256: "087ce49c3f0dc39180befefc60fdb4acd8f8620e5682fe2476afd0b3688bb4af" url: "https://pub.dev" source: hosted - version: "1.8.3" + version: "1.9.0" path_drawing: dependency: transitive description: @@ -228,74 +244,74 @@ packages: dependency: "direct main" description: name: path_provider - sha256: "909b84830485dbcd0308edf6f7368bc8fd76afa26a270420f34cabea2a6467a0" + sha256: fec0d61223fba3154d87759e3cc27fe2c8dc498f6386c6d6fc80d1afdd1bf378 url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.4" path_provider_android: dependency: transitive description: name: path_provider_android - sha256: "5d44fc3314d969b84816b569070d7ace0f1dea04bd94a83f74c4829615d22ad8" + sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.2.4" path_provider_foundation: dependency: transitive description: name: path_provider_foundation - sha256: "1b744d3d774e5a879bb76d6cd1ecee2ba2c6960c03b1020cd35212f6aa267ac5" + sha256: f234384a3fdd67f989b4d54a5d73ca2a6c422fa55ae694381ae0f4375cd1ea16 url: "https://pub.dev" source: hosted - version: "2.3.0" + version: "2.4.0" path_provider_linux: dependency: transitive description: name: path_provider_linux - sha256: ba2b77f0c52a33db09fc8caf85b12df691bf28d983e84cf87ff6d693cfa007b3 + sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.2.1" path_provider_platform_interface: dependency: transitive description: name: path_provider_platform_interface - sha256: bced5679c7df11190e1ddc35f3222c858f328fff85c3942e46e7f5589bf9eb84 + sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334" url: "https://pub.dev" source: hosted - version: "2.1.0" + version: "2.1.2" path_provider_windows: dependency: transitive description: name: path_provider_windows - sha256: ee0e0d164516b90ae1f970bdf29f726f1aa730d7cfc449ecc74c495378b705da + sha256: bd6f00dbd873bfb70d0761682da2b3a2c2fccc2b9e84c495821639601d81afe7 url: "https://pub.dev" source: hosted - version: "2.2.0" + version: "2.3.0" petitparser: dependency: transitive description: name: petitparser - sha256: "49392a45ced973e8d94a85fdb21293fbb40ba805fc49f2965101ae748a3683b4" + sha256: c15605cd28af66339f8eb6fbe0e541bfe2d1b72d5825efc6598f3e0a31b9ad27 url: "https://pub.dev" source: hosted - version: "5.1.0" + version: "6.0.2" platform: dependency: transitive description: name: platform - sha256: "57c07bf82207aee366dfaa3867b3164e4f03a238a461a11b0e8a3a510d51203d" + sha256: "9b71283fc13df574056616011fb138fd3b793ea47cc509c189a6c3fa5f8a1a65" url: "https://pub.dev" source: hosted - version: "3.1.1" + version: "3.1.5" plugin_platform_interface: dependency: transitive description: name: plugin_platform_interface - sha256: "43798d895c929056255600343db8f049921cbec94d31ec87f1dc5c16c01935dd" + sha256: "4820fbfdb9478b1ebae27888254d445073732dae3d6ea81f0b7e06d5dedc3f02" url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.8" pull_to_refresh: dependency: "direct main" description: @@ -316,10 +332,10 @@ packages: dependency: transitive description: name: share_plus_platform_interface - sha256: df08bc3a07d01f5ea47b45d03ffcba1fa9cd5370fb44b3f38c70e42cced0f956 + sha256: "251eb156a8b5fa9ce033747d73535bf53911071f8d3b6f4f0b578505ce0d4496" url: "https://pub.dev" source: hosted - version: "3.3.1" + version: "3.4.0" sky_engine: dependency: transitive description: flutter @@ -385,66 +401,66 @@ packages: dependency: "direct main" description: name: url_launcher - sha256: eb1e00ab44303d50dd487aab67ebc575456c146c6af44422f9c13889984c00f3 + sha256: "21b704ce5fa560ea9f3b525b43601c678728ba46725bab9b01187b4831377ed3" url: "https://pub.dev" source: hosted - version: "6.1.11" + version: "6.3.0" url_launcher_android: dependency: transitive description: name: url_launcher_android - sha256: "3dd2388cc0c42912eee04434531a26a82512b9cb1827e0214430c9bcbddfe025" + sha256: "17cd5e205ea615e2c6ea7a77323a11712dffa0720a8a90540db57a01347f9ad9" url: "https://pub.dev" source: hosted - version: "6.0.38" + version: "6.3.2" url_launcher_ios: dependency: transitive description: name: url_launcher_ios - sha256: "9af7ea73259886b92199f9e42c116072f05ff9bea2dcb339ab935dfc957392c2" + sha256: e43b677296fadce447e987a2f519dcf5f6d1e527dc35d01ffab4fff5b8a7063e url: "https://pub.dev" source: hosted - version: "6.1.4" + version: "6.3.1" url_launcher_linux: dependency: transitive description: name: url_launcher_linux - sha256: "207f4ddda99b95b4d4868320a352d374b0b7e05eefad95a4a26f57da413443f5" + sha256: e2b9622b4007f97f504cd64c0128309dfb978ae66adbe944125ed9e1750f06af url: "https://pub.dev" source: hosted - version: "3.0.5" + version: "3.2.0" url_launcher_macos: dependency: transitive description: name: url_launcher_macos - sha256: "1c4fdc0bfea61a70792ce97157e5cc17260f61abbe4f39354513f39ec6fd73b1" + sha256: "9a1a42d5d2d95400c795b2914c36fdcb525870c752569438e4ebb09a2b5d90de" url: "https://pub.dev" source: hosted - version: "3.0.6" + version: "3.2.0" url_launcher_platform_interface: dependency: transitive description: name: url_launcher_platform_interface - sha256: bfdfa402f1f3298637d71ca8ecfe840b4696698213d5346e9d12d4ab647ee2ea + sha256: "552f8a1e663569be95a8190206a38187b531910283c3e982193e4f2733f01029" url: "https://pub.dev" source: hosted - version: "2.1.3" + version: "2.3.2" url_launcher_web: dependency: transitive description: name: url_launcher_web - sha256: cc26720eefe98c1b71d85f9dc7ef0cada5132617046369d9dc296b3ecaa5cbb4 + sha256: "772638d3b34c779ede05ba3d38af34657a05ac55b06279ea6edd409e323dca8e" url: "https://pub.dev" source: hosted - version: "2.0.18" + version: "2.3.3" url_launcher_windows: dependency: transitive description: name: url_launcher_windows - sha256: "7967065dd2b5fccc18c653b97958fdf839c5478c28e767c61ee879f4e7882422" + sha256: "49c10f879746271804767cb45551ec5592cdab00ee105c06dddde1a98f73b185" url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "3.1.2" uuid: dependency: "direct main" description: @@ -461,14 +477,22 @@ packages: url: "https://pub.dev" source: hosted version: "2.1.4" + vm_service: + dependency: transitive + description: + name: vm_service + sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + url: "https://pub.dev" + source: hosted + version: "13.0.0" web: dependency: transitive description: name: web - sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152 + sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" url: "https://pub.dev" source: hosted - version: "0.3.0" + version: "0.5.1" win32: dependency: transitive description: @@ -481,18 +505,18 @@ packages: dependency: transitive description: name: xdg_directories - sha256: f0c26453a2d47aa4c2570c6a033246a3fc62da2fe23c7ffdd0a7495086dc0247 + sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d url: "https://pub.dev" source: hosted - version: "1.0.2" + version: "1.0.4" xml: dependency: transitive description: name: xml - sha256: ac0e3f4bf00ba2708c33fbabbbe766300e509f8c82dbd4ab6525039813f7e2fb + sha256: b015a8ad1c488f66851d762d3090a21c600e479dc75e68328c52774040cf9226 url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "6.5.0" sdks: - dart: ">=3.2.0-194.0.dev <4.0.0" - flutter: ">=3.16.0" + dart: ">=3.3.0 <4.0.0" + flutter: ">=3.19.0" From f6a31cdff239c27011782bf055a65ddf2f165c11 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 3 Sep 2024 10:51:33 -0400 Subject: [PATCH 22/36] Target/compile for SDK 34 --- android/app/build.gradle | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index c60549d9..30ce3ab3 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -26,7 +26,7 @@ if (flutterVersionName == null) { android { namespace "net.defined.mobile_nebula" - compileSdkVersion 33 + compileSdkVersion 34 ndkVersion flutter.ndkVersion compileOptions { @@ -45,7 +45,7 @@ android { defaultConfig { applicationId "net.defined.mobile_nebula" minSdkVersion 26 //flutter.minSdkVersion - targetSdkVersion 33 //flutter.targetSdkVersion + targetSdkVersion 34 //flutter.targetSdkVersion versionCode flutterVersionCode.toInteger() versionName flutterVersionName } From 89dea3d2d289bb972cfdd6e1a920e3d66be03bf9 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 3 Sep 2024 10:58:45 -0400 Subject: [PATCH 23/36] Build iOS app --- ios/Flutter/AppFrameworkInfo.plist | 2 +- ios/Podfile.lock | 19 ++++++++++--------- ios/Runner.xcodeproj/project.pbxproj | 11 +++++++---- .../xcshareddata/xcschemes/Runner.xcscheme | 2 +- ios/Runner/Info.plist | 2 ++ 5 files changed, 21 insertions(+), 15 deletions(-) diff --git a/ios/Flutter/AppFrameworkInfo.plist b/ios/Flutter/AppFrameworkInfo.plist index 4f8d4d24..8c6e5614 100644 --- a/ios/Flutter/AppFrameworkInfo.plist +++ b/ios/Flutter/AppFrameworkInfo.plist @@ -21,6 +21,6 @@ CFBundleVersion 1.0 MinimumOSVersion - 11.0 + 12.0 diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 68509264..ef742834 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -38,8 +38,9 @@ PODS: - Flutter - package_info (0.0.1): - Flutter - - path_provider_ios (0.0.1): + - path_provider_foundation (0.0.1): - Flutter + - FlutterMacOS - SDWebImage (5.15.5): - SDWebImage/Core (= 5.15.5) - SDWebImage/Core (5.15.5) @@ -55,7 +56,7 @@ DEPENDENCIES: - Flutter (from `Flutter`) - flutter_barcode_scanner (from `.symlinks/plugins/flutter_barcode_scanner/ios`) - package_info (from `.symlinks/plugins/package_info/ios`) - - path_provider_ios (from `.symlinks/plugins/path_provider_ios/ios`) + - path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`) - share_plus (from `.symlinks/plugins/share_plus/ios`) - SwiftyJSON (~> 5.0) - url_launcher_ios (from `.symlinks/plugins/url_launcher_ios/ios`) @@ -77,8 +78,8 @@ EXTERNAL SOURCES: :path: ".symlinks/plugins/flutter_barcode_scanner/ios" package_info: :path: ".symlinks/plugins/package_info/ios" - path_provider_ios: - :path: ".symlinks/plugins/path_provider_ios/ios" + path_provider_foundation: + :path: ".symlinks/plugins/path_provider_foundation/darwin" share_plus: :path: ".symlinks/plugins/share_plus/ios" url_launcher_ios: @@ -87,17 +88,17 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 - file_picker: 817ab1d8cd2da9d2da412a417162deee3500fc95 - Flutter: f04841e97a9d0b0a8025694d0796dd46242b2854 + file_picker: ce3938a0df3cc1ef404671531facef740d03f920 + Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_barcode_scanner: 7a1144744c28dc0c57a8de7218ffe5ec59a9e4bf package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 - path_provider_ios: 7d7ce634493af4477d156294792024ec3485acd5 + path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f SwiftyJSON: 2f33a42c6fbc52764d96f13368585094bfd8aa5e - url_launcher_ios: 02f1989d4e14e998335b02b67a7590fa34f971af + url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe PODFILE CHECKSUM: b4b37a776e1b487bf31fc5e5014fa5a74f5a022a -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 4f5ee6df..0c0bc349 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -3,7 +3,7 @@ archiveVersion = 1; classes = { }; - objectVersion = 52; + objectVersion = 54; objects = { /* Begin PBXBuildFile section */ @@ -287,7 +287,7 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 1140; - LastUpgradeCheck = 1300; + LastUpgradeCheck = 1510; ORGANIZATIONNAME = "The Chromium Authors"; TargetAttributes = { 43AA89532444DA6500EDC39C = { @@ -358,7 +358,7 @@ "${BUILT_PRODUCTS_DIR}/file_picker/file_picker.framework", "${BUILT_PRODUCTS_DIR}/flutter_barcode_scanner/flutter_barcode_scanner.framework", "${BUILT_PRODUCTS_DIR}/package_info/package_info.framework", - "${BUILT_PRODUCTS_DIR}/path_provider_ios/path_provider_ios.framework", + "${BUILT_PRODUCTS_DIR}/path_provider_foundation/path_provider_foundation.framework", "${BUILT_PRODUCTS_DIR}/share_plus/share_plus.framework", "${BUILT_PRODUCTS_DIR}/url_launcher_ios/url_launcher_ios.framework", ); @@ -372,7 +372,7 @@ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/file_picker.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/flutter_barcode_scanner.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/package_info.framework", - "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_ios.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/path_provider_foundation.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/share_plus.framework", "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/url_launcher_ios.framework", ); @@ -405,10 +405,12 @@ }; 3B06AD1E1E4923F5004D2608 /* Thin Binary */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputPaths = ( + "${TARGET_BUILD_DIR}/${INFOPLIST_PATH}", ); name = "Thin Binary"; outputPaths = ( @@ -419,6 +421,7 @@ }; 9740EEB61CF901F6004384FC /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); diff --git a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme index 65943b18..2669c414 100644 --- a/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme +++ b/ios/Runner.xcodeproj/xcshareddata/xcschemes/Runner.xcscheme @@ -1,6 +1,6 @@ UIViewControllerBasedStatusBarAppearance + UIApplicationSupportsIndirectInputEvents + From 7fa98cabda5e28811db9fab6556437c4f1b6d30b Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 3 Sep 2024 10:59:02 -0400 Subject: [PATCH 24/36] Move thin binary creation to end Otherwise we get a build error --- ios/Runner.xcodeproj/project.pbxproj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index 0c0bc349..cf4a1866 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -266,9 +266,9 @@ 97C146EB1CF9000F007C117D /* Frameworks */, 97C146EC1CF9000F007C117D /* Resources */, 9705A1C41CF9048500538489 /* Embed Frameworks */, - 3B06AD1E1E4923F5004D2608 /* Thin Binary */, 43AA89612444DA6500EDC39C /* Embed App Extensions */, 00C7A79AE88792090BDAC68B /* [CP] Embed Pods Frameworks */, + 3B06AD1E1E4923F5004D2608 /* Thin Binary */, ); buildRules = ( ); From 7d11658662771b488489fb1890fbbfade34ac2f7 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 3 Sep 2024 11:01:43 -0400 Subject: [PATCH 25/36] Wrap PlatformProvider in MaterialApp and Scaffold Some material elements, like AdaptiveSwitch, won't work in iOS without it. --- lib/main.dart | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/lib/main.dart b/lib/main.dart index 449da334..a5a3047b 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -2,7 +2,7 @@ import 'dart:async'; import 'package:flutter/cupertino.dart' show CupertinoThemeData, DefaultCupertinoLocalizations; import 'package:flutter/material.dart' - show BottomSheetThemeData, Colors, DefaultMaterialLocalizations, Theme, ThemeData, ThemeMode; + show BottomSheetThemeData, Colors, DefaultMaterialLocalizations, ThemeData, ThemeMode, MaterialApp, Scaffold; import 'package:flutter/scheduler.dart'; import 'package:flutter/services.dart'; import 'package:flutter/widgets.dart'; @@ -82,10 +82,10 @@ class _AppState extends State { ), ); - // This theme is required since icons light/dark mode will look for it - return Theme( - data: brightness == Brightness.light ? lightTheme : darkTheme, - child: PlatformProvider( + return MaterialApp( + theme: brightness == Brightness.light ? lightTheme : darkTheme, + home: Scaffold( + body: PlatformProvider( //initialPlatform: initialPlatform, builder: (context) => PlatformApp( debugShowCheckedModeBanner: false, @@ -122,6 +122,7 @@ class _AppState extends State { }, ), ), + ), ); } } From e2259ba8f7f795e2247ab7e435dcea9ad36e529e Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 3 Sep 2024 11:15:38 -0400 Subject: [PATCH 26/36] Update flutter and dependencies to latest --- README.md | 2 +- ios/Podfile.lock | 4 +- ios/Runner/AppDelegate.swift | 2 +- pubspec.lock | 140 ++++++++++++++++++++++++----------- pubspec.yaml | 12 +-- 5 files changed, 108 insertions(+), 52 deletions(-) diff --git a/README.md b/README.md index e7a41681..01349af5 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ Install all of the following things: - [`xcode`](https://apps.apple.com/us/app/xcode/) - [`android-studio`](https://developer.android.com/studio) -- [`flutter` 3.19.0](https://docs.flutter.dev/get-started/install) +- [`flutter` 3.24.1](https://docs.flutter.dev/get-started/install) - [`gomobile`](https://pkg.go.dev/golang.org/x/mobile/cmd/gomobile) - [Flutter Android Studio Extension](https://docs.flutter.dev/get-started/editor?tab=androidstudio) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index ef742834..010bdfdb 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -88,13 +88,13 @@ EXTERNAL SOURCES: SPEC CHECKSUMS: DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac DKPhotoGallery: fdfad5125a9fdda9cc57df834d49df790dbb4179 - file_picker: ce3938a0df3cc1ef404671531facef740d03f920 + file_picker: 09aa5ec1ab24135ccd7a1621c46c84134bfd6655 Flutter: e0871f40cf51350855a761d2e70bf5af5b9b5de7 flutter_barcode_scanner: 7a1144744c28dc0c57a8de7218ffe5ec59a9e4bf package_info: 873975fc26034f0b863a300ad47e7f1ac6c7ec62 path_provider_foundation: 2b6b4c569c0fb62ec74538f866245ac84301af46 SDWebImage: fd7e1a22f00303e058058278639bf6196ee431fe - share_plus: 056a1e8ac890df3e33cb503afffaf1e9b4fbae68 + share_plus: 8875f4f2500512ea181eef553c3e27dba5135aad SwiftyGif: 93a1cc87bf3a51916001cf8f3d63835fb64c819f SwiftyJSON: 2f33a42c6fbc52764d96f13368585094bfd8aa5e url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe diff --git a/ios/Runner/AppDelegate.swift b/ios/Runner/AppDelegate.swift index 5256db2b..8a44693a 100644 --- a/ios/Runner/AppDelegate.swift +++ b/ios/Runner/AppDelegate.swift @@ -12,7 +12,7 @@ func MissingArgumentError(message: String, details: Any?) -> FlutterError { return FlutterError(code: "missing_argument", message: message, details: details) } -@UIApplicationMain +@main @objc class AppDelegate: FlutterAppDelegate { private let dnUpdater = DNUpdater() private let apiClient = APIClient() diff --git a/pubspec.lock b/pubspec.lock index 88e6dda7..ae299248 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -1,6 +1,14 @@ # Generated by pub # See https://dart.dev/tools/pub/glossary#lockfile packages: + args: + dependency: transitive + description: + name: args + sha256: "7cf60b9f0cc88203c5a190b4cd62a99feea42759a7fa695010eb5de1c0b2252a" + url: "https://pub.dev" + source: hosted + version: "2.5.0" async: dependency: transitive description: @@ -93,10 +101,18 @@ packages: dependency: "direct main" description: name: file_picker - sha256: b85eb92b175767fdaa0c543bf3b0d1f610fe966412ea72845fe5ba7801e763ff + sha256: "167bb619cdddaa10ef2907609feb8a79c16dfa479d3afaf960f8e223f754bf12" + url: "https://pub.dev" + source: hosted + version: "8.1.2" + fixnum: + dependency: transitive + description: + name: fixnum + sha256: "25517a4deb0c03aa0f32fd12db525856438902d9c16536311e76cdc57b31d7d1" url: "https://pub.dev" source: hosted - version: "5.2.10" + version: "1.1.0" flutter: dependency: "direct main" description: flutter @@ -114,10 +130,10 @@ packages: dependency: "direct main" description: name: flutter_platform_widgets - sha256: c483c0591d845d2adb84e341a1cfb746f1a8a7aff4c72a5957772446020601f4 + sha256: "84f39540cf433aa44b235b7fca6518d1bd30aa281d8196f00be60bc76cac96f4" url: "https://pub.dev" source: hosted - version: "6.1.0" + version: "7.0.1" flutter_plugin_android_lifecycle: dependency: transitive description: @@ -130,10 +146,10 @@ packages: dependency: "direct main" description: name: flutter_svg - sha256: "6ff9fa12892ae074092de2fa6a9938fb21dbabfdaa2ff57dc697ff912fc8d4b2" + sha256: "7b4ca6cf3304575fe9c8ec64813c8d02ee41d2afe60bcfe0678bcb5375d596a2" url: "https://pub.dev" source: hosted - version: "1.1.6" + version: "2.0.10+1" flutter_test: dependency: "direct dev" description: flutter @@ -144,38 +160,54 @@ packages: description: flutter source: sdk version: "0.0.0" + http: + dependency: transitive + description: + name: http + sha256: b9c29a161230ee03d3ccf545097fccd9b87a5264228c5d348202e0f0c28f9010 + url: "https://pub.dev" + source: hosted + version: "1.2.2" + http_parser: + dependency: transitive + description: + name: http_parser + sha256: "2aa08ce0341cc9b354a498388e30986515406668dbcc4f7c950c3e715496693b" + url: "https://pub.dev" + source: hosted + version: "4.0.2" intl: dependency: "direct main" description: name: intl - sha256: "910f85bce16fb5c6f614e117efa303e85a1731bb0081edf3604a2ae6e9a3cc91" + sha256: d6f56758b7d3014a48af9701c085700aac781a92a87a62b1333b46d8879661cf url: "https://pub.dev" source: hosted - version: "0.17.0" + version: "0.19.0" leak_tracker: dependency: transitive description: name: leak_tracker - sha256: "78eb209deea09858f5269f5a5b02be4049535f568c07b275096836f01ea323fa" + sha256: "3f87a60e8c63aecc975dda1ceedbc8f24de75f09e4856ea27daf8958f2f0ce05" url: "https://pub.dev" source: hosted - version: "10.0.0" + version: "10.0.5" leak_tracker_flutter_testing: dependency: transitive description: name: leak_tracker_flutter_testing - sha256: b46c5e37c19120a8a01918cfaf293547f47269f7cb4b0058f21531c2465d6ef0 + sha256: "932549fb305594d82d7183ecd9fa93463e9914e1b67cacc34bc40906594a1806" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.5" leak_tracker_testing: dependency: transitive description: name: leak_tracker_testing - sha256: a597f72a664dbd293f3bfc51f9ba69816f84dcd403cdac7066cb3f6003f3ab47 + sha256: "6ba465d5d76e67ddf503e1161d1f4a6bc42306f9d66ca1e8f079a47290fb06d3" url: "https://pub.dev" source: hosted - version: "2.0.1" + version: "3.0.1" matcher: dependency: transitive description: @@ -188,18 +220,18 @@ packages: dependency: transitive description: name: material_color_utilities - sha256: "0e0a020085b65b6083975e499759762399b4475f766c21668c4ecca34ea74e5a" + sha256: f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec url: "https://pub.dev" source: hosted - version: "0.8.0" + version: "0.11.1" meta: dependency: transitive description: name: meta - sha256: d584fa6707a52763a52446f02cc621b077888fb63b93bbcb1143a7be5a0c0c04 + sha256: bdb68674043280c3428e9ec998512fb681678676b3c54e773629ffe74419f8c7 url: "https://pub.dev" source: hosted - version: "1.11.0" + version: "1.15.0" mime: dependency: transitive description: @@ -224,14 +256,6 @@ packages: url: "https://pub.dev" source: hosted version: "1.9.0" - path_drawing: - dependency: transitive - description: - name: path_drawing - sha256: bbb1934c0cbb03091af082a6389ca2080345291ef07a5fa6d6e078ba8682f977 - url: "https://pub.dev" - source: hosted - version: "1.0.1" path_parsing: dependency: transitive description: @@ -324,18 +348,18 @@ packages: dependency: "direct main" description: name: share_plus - sha256: b1f15232d41e9701ab2f04181f21610c36c83a12ae426b79b4bd011c567934b1 + sha256: "468c43f285207c84bcabf5737f33b914ceb8eb38398b91e5e3ad1698d1b72a52" url: "https://pub.dev" source: hosted - version: "6.3.4" + version: "10.0.2" share_plus_platform_interface: dependency: transitive description: name: share_plus_platform_interface - sha256: "251eb156a8b5fa9ce033747d73535bf53911071f8d3b6f4f0b578505ce0d4496" + sha256: "6ababf341050edff57da8b6990f11f4e99eaba837865e2e6defe16d039619db5" url: "https://pub.dev" source: hosted - version: "3.4.0" + version: "5.0.0" sky_engine: dependency: transitive description: flutter @@ -349,6 +373,14 @@ packages: url: "https://pub.dev" source: hosted version: "1.10.0" + sprintf: + dependency: transitive + description: + name: sprintf + sha256: "1fc9ffe69d4df602376b52949af107d8f5703b77cda567c4d7d86a0693120f23" + url: "https://pub.dev" + source: hosted + version: "7.0.0" stack_trace: dependency: transitive description: @@ -385,10 +417,10 @@ packages: dependency: transitive description: name: test_api - sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b" + sha256: "5b8a98dafc4d5c4c9c72d8b31ab2b23fc13422348d2997120294d3bac86b4ddb" url: "https://pub.dev" source: hosted - version: "0.6.1" + version: "0.7.2" typed_data: dependency: transitive description: @@ -465,10 +497,34 @@ packages: dependency: "direct main" description: name: uuid - sha256: "648e103079f7c64a36dc7d39369cabb358d377078a051d6ae2ad3aa539519313" + sha256: f33d6bb662f0e4f79dcd7ada2e6170f3b3a2530c28fc41f49a411ddedd576a77 + url: "https://pub.dev" + source: hosted + version: "4.5.0" + vector_graphics: + dependency: transitive + description: + name: vector_graphics + sha256: "32c3c684e02f9bc0afb0ae0aa653337a2fe022e8ab064bcd7ffda27a74e288e3" + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_codec: + dependency: transitive + description: + name: vector_graphics_codec + sha256: c86987475f162fadff579e7320c7ddda04cd2fdeffbe1129227a85d9ac9e03da + url: "https://pub.dev" + source: hosted + version: "1.1.11+1" + vector_graphics_compiler: + dependency: transitive + description: + name: vector_graphics_compiler + sha256: "12faff3f73b1741a36ca7e31b292ddeb629af819ca9efe9953b70bd63fc8cd81" url: "https://pub.dev" source: hosted - version: "3.0.7" + version: "1.1.11+1" vector_math: dependency: transitive description: @@ -481,26 +537,26 @@ packages: dependency: transitive description: name: vm_service - sha256: b3d56ff4341b8f182b96aceb2fa20e3dcb336b9f867bc0eafc0de10f1048e957 + sha256: "5c5f338a667b4c644744b661f309fb8080bb94b18a7e91ef1dbd343bed00ed6d" url: "https://pub.dev" source: hosted - version: "13.0.0" + version: "14.2.5" web: dependency: transitive description: name: web - sha256: "97da13628db363c635202ad97068d47c5b8aa555808e7a9411963c533b449b27" + sha256: d43c1d6b787bf0afad444700ae7f4db8827f701bc61c255ac8d328c6f4d52062 url: "https://pub.dev" source: hosted - version: "0.5.1" + version: "1.0.0" win32: dependency: transitive description: name: win32 - sha256: a6f0236dbda0f63aa9a25ad1ff9a9d8a4eaaa5012da0dc59d21afdb1dc361ca4 + sha256: "68d1e89a91ed61ad9c370f9f8b6effed9ae5e0ede22a270bdfa6daf79fc2290a" url: "https://pub.dev" source: hosted - version: "3.1.4" + version: "5.5.4" xdg_directories: dependency: transitive description: @@ -518,5 +574,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.3.0 <4.0.0" - flutter: ">=3.19.0" + dart: ">=3.4.0 <4.0.0" + flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index 70ac52cf..8a53e000 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,17 +23,17 @@ dependencies: # The following adds the Cupertino Icons font to your application. # Use with the CupertinoIcons class for iOS style icons. cupertino_icons: ^1.0.2 - flutter_platform_widgets: 6.1.0 + flutter_platform_widgets: ^7.0.1 path_provider: ^2.0.11 - file_picker: ^5.0.1 - uuid: ^3.0.4 + file_picker: ^8.1.2 + uuid: ^4.4.2 package_info: ^2.0.0 url_launcher: ^6.1.6 pull_to_refresh: ^2.0.0 flutter_barcode_scanner: ^2.0.0 - flutter_svg: ^1.1.5 - intl: ^0.17.0 - share_plus: ^6.3.0 + flutter_svg: ^2.0.10+1 + intl: ^0.19.0 + share_plus: ^10.0.2 dev_dependencies: flutter_test: From 78a2ca8ea7b142884773b0eac4b3eedba8036d8b Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 3 Sep 2024 11:32:59 -0400 Subject: [PATCH 27/36] Replace deprecated `onPopInvoked` with `onPopInvokedWithResult` https://docs.flutter.dev/release/breaking-changes/popscope-with-result --- lib/components/FormPage.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/components/FormPage.dart b/lib/components/FormPage.dart index 9f41fd16..e5be025d 100644 --- a/lib/components/FormPage.dart +++ b/lib/components/FormPage.dart @@ -38,9 +38,9 @@ class _FormPageState extends State { Widget build(BuildContext context) { changed = widget.changed || changed; - return PopScope( + return PopScope( canPop: false, - onPopInvoked: (bool didPop) async { + onPopInvokedWithResult: (bool didPop, Object? result) async { if (didPop) { return; } From 85a2c0809e7100c7ce8704d9d3d0d09df68acde3 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 3 Sep 2024 12:19:28 -0400 Subject: [PATCH 28/36] Update flutter-version in a few more spots --- .github/workflows/flutterfmt.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/flutterfmt.yml b/.github/workflows/flutterfmt.yml index 1b56cecd..597e914e 100644 --- a/.github/workflows/flutterfmt.yml +++ b/.github/workflows/flutterfmt.yml @@ -18,7 +18,7 @@ jobs: - name: Install flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.3.5' + flutter-version: '3.24.1' - name: Check out code uses: actions/checkout@v3 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 09e28e3b..ae18d24e 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,7 +24,7 @@ jobs: - name: Install flutter uses: subosito/flutter-action@v2 with: - flutter-version: '3.3.5' + flutter-version: '3.24.1' - uses: nttld/setup-ndk@v1 id: setup-ndk From 8c20397accc0f519a856e422cc481217a5fe0b8d Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 6 Sep 2024 09:37:32 -0400 Subject: [PATCH 29/36] Remove NDK version pin https://github.com/flutter/flutter/issues/139427#issuecomment-1989024985 --- android/app/build.gradle | 1 - 1 file changed, 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 30ce3ab3..7798cd3e 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -27,7 +27,6 @@ android { namespace "net.defined.mobile_nebula" compileSdkVersion 34 - ndkVersion flutter.ndkVersion compileOptions { sourceCompatibility JavaVersion.VERSION_1_8 From 28a49f86cf0296ba4f053a8b5bde49dc6bdac3df Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 10 Sep 2024 10:24:50 -0400 Subject: [PATCH 30/36] Use constant to specify java version --- android/app/build.gradle | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/android/app/build.gradle b/android/app/build.gradle index 7798cd3e..5d924c42 100644 --- a/android/app/build.gradle +++ b/android/app/build.gradle @@ -34,7 +34,7 @@ android { } kotlinOptions { - jvmTarget = '1.8' + jvmTarget = JavaVersion.VERSION_1_8 } sourceSets { From 51fe0a5d41267a200ec4fb1b2ec3b2455a83a253 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Tue, 10 Sep 2024 10:27:08 -0400 Subject: [PATCH 31/36] Replace deprecated flutter package_info dep https://pub.dev/documentation/package_info/latest/ lists package_info_plus as its replacement --- lib/screens/AboutScreen.dart | 2 +- pubspec.lock | 16 ++++++++++++---- pubspec.yaml | 2 +- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/lib/screens/AboutScreen.dart b/lib/screens/AboutScreen.dart index 43c5d59b..b2c44b4d 100644 --- a/lib/screens/AboutScreen.dart +++ b/lib/screens/AboutScreen.dart @@ -6,7 +6,7 @@ import 'package:mobile_nebula/components/config/ConfigPageItem.dart'; import 'package:mobile_nebula/components/config/ConfigSection.dart'; import 'package:mobile_nebula/gen.versions.dart'; import 'package:mobile_nebula/services/utils.dart'; -import 'package:package_info/package_info.dart'; +import 'package:package_info_plus/package_info_plus.dart'; class AboutScreen extends StatefulWidget { const AboutScreen({Key? key}) : super(key: key); diff --git a/pubspec.lock b/pubspec.lock index ae299248..94da4455 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -240,14 +240,22 @@ packages: url: "https://pub.dev" source: hosted version: "1.0.6" - package_info: + package_info_plus: dependency: "direct main" description: - name: package_info - sha256: "6c07d9d82c69e16afeeeeb6866fe43985a20b3b50df243091bfc4a4ad2b03b75" + name: package_info_plus + sha256: a75164ade98cb7d24cfd0a13c6408927c6b217fa60dee5a7ff5c116a58f28918 url: "https://pub.dev" source: hosted - version: "2.0.2" + version: "8.0.2" + package_info_plus_platform_interface: + dependency: transitive + description: + name: package_info_plus_platform_interface + sha256: ac1f4a4847f1ade8e6a87d1f39f5d7c67490738642e2542f559ec38c37489a66 + url: "https://pub.dev" + source: hosted + version: "3.0.1" path: dependency: transitive description: diff --git a/pubspec.yaml b/pubspec.yaml index 8a53e000..b3edfbdd 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -27,7 +27,7 @@ dependencies: path_provider: ^2.0.11 file_picker: ^8.1.2 uuid: ^4.4.2 - package_info: ^2.0.0 + package_info_plus: ^8.0.2 url_launcher: ^6.1.6 pull_to_refresh: ^2.0.0 flutter_barcode_scanner: ^2.0.0 From 2dfbd23b12d2f4b0a0371a60dc952417debd839c Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Wed, 11 Sep 2024 08:23:23 -0400 Subject: [PATCH 32/36] Update dart sdk version --- pubspec.lock | 2 +- pubspec.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pubspec.lock b/pubspec.lock index 94da4455..11f68afe 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -582,5 +582,5 @@ packages: source: hosted version: "6.5.0" sdks: - dart: ">=3.4.0 <4.0.0" + dart: ">=3.5.1 <4.0.0" flutter: ">=3.22.0" diff --git a/pubspec.yaml b/pubspec.yaml index b3edfbdd..d9952808 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -14,7 +14,7 @@ description: Mobile Nebula Client version: 0.1.0+54 environment: - sdk: '>=2.18.1 <3.0.0' + sdk: ^3.5.1 dependencies: flutter: From 1b8449fb42cf28eb86ff532e3cf5dc93432e9b56 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 20 Sep 2024 12:49:44 -0400 Subject: [PATCH 33/36] Run flutter clean / pub get --- nebula/go.mod | 14 +++++++------- nebula/go.sum | 10 ++++++++++ 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/nebula/go.mod b/nebula/go.mod index a7e350e4..7c85ce62 100644 --- a/nebula/go.mod +++ b/nebula/go.mod @@ -10,7 +10,7 @@ require ( github.com/DefinedNet/dnapi v0.0.0-20240611201323-4589547bd270 github.com/sirupsen/logrus v1.9.3 github.com/slackhq/nebula v1.9.3 - golang.org/x/crypto v0.26.0 + golang.org/x/crypto v0.27.0 gopkg.in/yaml.v2 v2.4.0 ) @@ -34,13 +34,13 @@ require ( github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 // indirect github.com/vishvananda/netlink v1.2.1-beta.2 // indirect github.com/vishvananda/netns v0.0.4 // indirect - golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab // indirect - golang.org/x/mod v0.20.0 // indirect - golang.org/x/net v0.28.0 // indirect + golang.org/x/mobile v0.0.0-20240909163608-642950227fb3 // indirect + golang.org/x/mod v0.21.0 // indirect + golang.org/x/net v0.29.0 // indirect golang.org/x/sync v0.8.0 // indirect - golang.org/x/sys v0.23.0 // indirect - golang.org/x/term v0.23.0 // indirect - golang.org/x/tools v0.24.0 // indirect + golang.org/x/sys v0.25.0 // indirect + golang.org/x/term v0.24.0 // indirect + golang.org/x/tools v0.25.0 // indirect golang.zx2c4.com/wintun v0.0.0-20230126152724-0fa3db229ce2 // indirect golang.zx2c4.com/wireguard v0.0.0-20231211153847-12269c276173 // indirect golang.zx2c4.com/wireguard/windows v0.5.3 // indirect diff --git a/nebula/go.sum b/nebula/go.sum index 022395e2..66c70a91 100644 --- a/nebula/go.sum +++ b/nebula/go.sum @@ -148,9 +148,12 @@ golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab h1:KONOFF8Uy3b60HEzOsGnNghORNhY4ImyOx0PGm73K9k= golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab/go.mod h1:udWezQGYjqrCxz5nV321pXQTx5oGbZx+khZvFjZNOPM= +golang.org/x/mobile v0.0.0-20240909163608-642950227fb3 h1:HOa20LMHFElnLsGI9j8/sxTIHpogkTuHZlyoIjl3kkw= +golang.org/x/mobile v0.0.0-20240909163608-642950227fb3/go.mod h1:5EJr05J3jS1A5hwVNxs4vC0pIRxtWmwM15D1ZxCj93s= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= @@ -158,6 +161,8 @@ golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= +golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= +golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20181114220301-adae6a3d119a/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -171,6 +176,7 @@ golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -201,10 +207,12 @@ golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBc golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= @@ -217,6 +225,8 @@ golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= +golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= +golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0= From 8d40bd70d73680e6e976fb0f14004e34ecaf073f Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 20 Sep 2024 12:54:28 -0400 Subject: [PATCH 34/36] Default text field enabled to true --- lib/components/SpecialTextField.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/components/SpecialTextField.dart b/lib/components/SpecialTextField.dart index 54ddf45a..aa4f645d 100644 --- a/lib/components/SpecialTextField.dart +++ b/lib/components/SpecialTextField.dart @@ -90,7 +90,7 @@ class _SpecialTextFieldState extends State { autofocus: widget.autofocus, focusNode: widget.focusNode, onChanged: widget.onChanged, - enabled: widget.enabled ?? false, // TODO: maybe there's a better way to do this? widget.enabled is nullable, should it be? + enabled: widget.enabled ?? true, onSubmitted: (_) { if (widget.nextFocusNode != null) { FocusScope.of(context).requestFocus(widget.nextFocusNode); From 7875edddf5a607095fddbc6cea2125dc7cd8a413 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 20 Sep 2024 12:56:36 -0400 Subject: [PATCH 35/36] Restore _getString helper --- lib/services/settings.dart | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/services/settings.dart b/lib/services/settings.dart index 14f5bc30..d4d47427 100644 --- a/lib/services/settings.dart +++ b/lib/services/settings.dart @@ -37,6 +37,14 @@ class Settings { _set('logWrap', enabled); } + String _getString(String key, String defaultValue) { + final val = _settings[key]; + if (val is String) { + return val; + } + return defaultValue; + } + bool _getBool(String key, bool defaultValue) { final val = _settings[key]; if (val is bool) { From d4e2130ee576112e2d675e0516bf359e60a7d175 Mon Sep 17 00:00:00 2001 From: Ian VanSchooten Date: Fri, 20 Sep 2024 14:15:28 -0400 Subject: [PATCH 36/36] go mod tidy --- nebula/go.mod | 1 - nebula/go.sum | 30 ++++-------------------------- 2 files changed, 4 insertions(+), 27 deletions(-) diff --git a/nebula/go.mod b/nebula/go.mod index 7c85ce62..1415ec14 100644 --- a/nebula/go.mod +++ b/nebula/go.mod @@ -34,7 +34,6 @@ require ( github.com/songgao/water v0.0.0-20200317203138-2b4b6d7c09d8 // indirect github.com/vishvananda/netlink v1.2.1-beta.2 // indirect github.com/vishvananda/netns v0.0.4 // indirect - golang.org/x/mobile v0.0.0-20240909163608-642950227fb3 // indirect golang.org/x/mod v0.21.0 // indirect golang.org/x/net v0.29.0 // indirect golang.org/x/sync v0.8.0 // indirect diff --git a/nebula/go.sum b/nebula/go.sum index 66c70a91..cc1a9865 100644 --- a/nebula/go.sum +++ b/nebula/go.sum @@ -145,22 +145,12 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/crypto v0.0.0-20210322153248-0c34fe9e7dc2/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= -golang.org/x/crypto v0.24.0 h1:mnl8DM0o513X8fdIkmyFE/5hTYxbwYOjDS/+rK6qpRI= -golang.org/x/crypto v0.24.0/go.mod h1:Z1PMYSOR5nyMcyAVAIQSKCDwalqy85Aqn1x3Ws4L5DM= -golang.org/x/crypto v0.26.0/go.mod h1:GY7jblb9wI+FOo5y8/S2oY4zWP07AkOJ4+jxCqdqn54= +golang.org/x/crypto v0.27.0 h1:GXm2NjJrPaiv/h1tb2UH8QfgC/hOf/+z0p6PT8o1w7A= golang.org/x/crypto v0.27.0/go.mod h1:1Xngt8kV6Dvbssa53Ziq6Eqn0HqbZi5Z6R0ZpwQzt70= golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= -golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab h1:KONOFF8Uy3b60HEzOsGnNghORNhY4ImyOx0PGm73K9k= -golang.org/x/mobile v0.0.0-20240806205939-81131f6468ab/go.mod h1:udWezQGYjqrCxz5nV321pXQTx5oGbZx+khZvFjZNOPM= -golang.org/x/mobile v0.0.0-20240909163608-642950227fb3 h1:HOa20LMHFElnLsGI9j8/sxTIHpogkTuHZlyoIjl3kkw= -golang.org/x/mobile v0.0.0-20240909163608-642950227fb3/go.mod h1:5EJr05J3jS1A5hwVNxs4vC0pIRxtWmwM15D1ZxCj93s= golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= -golang.org/x/mod v0.18.0 h1:5+9lSbEzPSdWkH32vYPBwEpX8KwDbM52Ud9xBUvNlb0= -golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= -golang.org/x/mod v0.20.0 h1:utOm6MM3R3dnawAiJgn0y+xvuYRsm1RKM/4giyfDgV0= -golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= @@ -173,9 +163,7 @@ golang.org/x/net v0.0.0-20200226121028-0de0cce0169b/go.mod h1:z5CRVTTTmAJ677TzLL golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= -golang.org/x/net v0.26.0 h1:soB7SVo0PWrY4vPW/+ay0jKDNScG2X9wFeYlXIvJsOQ= -golang.org/x/net v0.26.0/go.mod h1:5YKkiSynbBIh3p6iOc/vibscux0x38BZDkn8sCUPxHE= -golang.org/x/net v0.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= +golang.org/x/net v0.29.0 h1:5ORfpBpCs4HzDYoodCDBbwHzdR5UrLBZ3sOnUJmFoHo= golang.org/x/net v0.29.0/go.mod h1:gLkgy8jTGERgjzMic6DS9+SP0ajcu6Xu3Orq/SpETg0= golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/sync v0.0.0-20181108010431-42b317875d0f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= @@ -184,8 +172,6 @@ golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJ golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= -golang.org/x/sync v0.7.0 h1:YsImfSBoP9QPYL0xyKJPq0gcaJdG3rInoqxTWbfQu9M= -golang.org/x/sync v0.7.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.8.0 h1:3NFvSEYkUoMifnESzZl15y791HH1qU2xm6eCJU5ZPXQ= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY= @@ -204,14 +190,10 @@ golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7w golang.org/x/sys v0.0.0-20210124154548-22da62e12c0c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20210603081109-ebe580a85c40/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= -golang.org/x/sys v0.21.0 h1:rF+pYz3DAGSQAxAu1CbC7catZg4ebC4UIeIhKxBZvws= -golang.org/x/sys v0.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= -golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.25.0 h1:r+8e+loiHxRqhXVl6ML1nO3l1+oFoWbnlu2Ehimmi34= golang.org/x/sys v0.25.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo= -golang.org/x/term v0.21.0 h1:WVXCp+/EBEHOj53Rvu+7KiT/iElMrO8ACK16SMZ3jaA= -golang.org/x/term v0.21.0/go.mod h1:ooXLefLobQVslOqselCNF4SxFAaoS6KujMbsGzSDmX0= -golang.org/x/term v0.23.0/go.mod h1:DgV24QBUrK6jhZXl+20l6UWznPlwAHm1Q1mGHtydmSk= +golang.org/x/term v0.24.0 h1:Mh5cbb+Zk2hqqXNO7S1iTjEphVL+jb8ZWaqh/g+JWkM= golang.org/x/term v0.24.0/go.mod h1:lOBK/LVxemqiMij05LGJ0tzNr8xlmwBRJ81PX6wVLH8= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= @@ -221,10 +203,6 @@ golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtn golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= golang.org/x/tools v0.0.0-20200619180055-7c47624df98f/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= golang.org/x/tools v0.0.0-20210106214847-113979e3529a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= -golang.org/x/tools v0.22.0 h1:gqSGLZqv+AI9lIQzniJ0nZDRG5GBPsSi+DRNHWNz6yA= -golang.org/x/tools v0.22.0/go.mod h1:aCwcsjqvq7Yqt6TNyX7QMU2enbQ/Gt0bo6krSeEri+c= -golang.org/x/tools v0.24.0 h1:J1shsA93PJUEVaUSaay7UXAyE8aimq3GW0pjlolpa24= -golang.org/x/tools v0.24.0/go.mod h1:YhNqVBIfWHdzvTLs0d8LCuMhkKUgSUKldakyV7W/WDQ= golang.org/x/tools v0.25.0 h1:oFU9pkj/iJgs+0DT+VMHrx+oBKs/LJMV+Uvg78sl+fE= golang.org/x/tools v0.25.0/go.mod h1:/vtpO8WL1N9cQC3FN5zPqb//fRXskFHbLKk4OW1Q7rg= golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=