Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified android/app/src/main/jniLibs/arm64-v8a/librust_lib_vnt_app.so
Binary file not shown.
Binary file modified android/app/src/main/jniLibs/armeabi-v7a/librust_lib_vnt_app.so
Binary file not shown.
Binary file modified android/app/src/main/jniLibs/x86_64/librust_lib_vnt_app.so
Binary file not shown.
24 changes: 20 additions & 4 deletions android/build.gradle
Original file line number Diff line number Diff line change
@@ -1,18 +1,34 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is auto generated.
// To update all the build.gradle files in the Flutter repo,
// See dev/tools/bin/generate_gradle_lockfiles.dart.

allprojects {
repositories {
google()
mavenCentral()
}
}

rootProject.buildDir = "../build"
rootProject.layout.buildDirectory.value(rootProject.layout.buildDirectory.dir("../../build").get())

subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
project.layout.buildDirectory.value(rootProject.layout.buildDirectory.dir(project.name).get())
}
subprojects {
project.evaluationDependsOn(":app")
project.evaluationDependsOn(':app')
dependencyLocking {
ignoredDependencies.add('io.flutter:*')
lockFile = file("${rootProject.projectDir}/project-${project.name}.lockfile")
if (!project.hasProperty('local-engine-repo')) {
lockAllConfigurations()
}
}
}

tasks.register("clean", Delete) {
delete rootProject.buildDir
delete rootProject.layout.buildDirectory
}
2 changes: 1 addition & 1 deletion android/gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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.6.3-all.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.14-all.zip
24 changes: 20 additions & 4 deletions android/settings.gradle
Original file line number Diff line number Diff line change
@@ -1,13 +1,22 @@
// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

// This file is auto generated.
// To update all the settings.gradle files in the Flutter repo,
// See dev/tools/bin/generate_gradle_lockfiles.dart.

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
}()
}
settings.ext.flutterSdkPath = flutterSdkPath()

includeBuild("$flutterSdkPath/packages/flutter_tools/gradle")
includeBuild("${settings.ext.flutterSdkPath}/packages/flutter_tools/gradle")

repositories {
google()
Expand All @@ -16,10 +25,17 @@ pluginManagement {
}
}

buildscript {
dependencyLocking {
lockFile = file("${rootProject.projectDir}/buildscript-gradle.lockfile")
lockAllConfigurations()
}
}

plugins {
id "dev.flutter.flutter-plugin-loader" version "1.0.0"
id "com.android.application" version "7.3.0" apply false
id "org.jetbrains.kotlin.android" version "1.7.10" apply false
id "com.android.application" version "8.9.1" apply false
id "org.jetbrains.kotlin.android" version "2.1.0" apply false
}

include ":app"
2 changes: 2 additions & 0 deletions lib/connect_log.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ import 'dart:io';
import 'package:flutter/material.dart';

class LogPage extends StatefulWidget {
const LogPage({super.key});

@override
_LogPageState createState() => _LogPageState();
}
Expand Down
2 changes: 1 addition & 1 deletion lib/connected_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ class _ConnectDetailPageState extends State<ConnectDetailPage> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LogPage(),
builder: (context) => const LogPage(),
),
);
},
Expand Down
5 changes: 3 additions & 2 deletions lib/custom_app_bar.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
final Color backgroundColor;
final List<Widget> actions;

const CustomAppBar({super.key,
const CustomAppBar({
super.key,
required this.title,
this.backgroundColor = Colors.blue,
this.actions = const [],
Expand All @@ -21,5 +22,5 @@ class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
}

@override
Size get preferredSize => Size.fromHeight(kToolbarHeight);
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}
8 changes: 4 additions & 4 deletions lib/network_config_input_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class _NetworkConfigInputPageState extends State<NetworkConfigInputPage> {
String _compressionMethod = 'none'; // 默认不压缩
int _compressionLevel = 3; // 默认压缩级别

_NetworkConfigInputPageState() {}
_NetworkConfigInputPageState();

@override
void initState() {
Expand Down Expand Up @@ -706,7 +706,7 @@ class _NetworkConfigInputPageState extends State<NetworkConfigInputPage> {
}
return null;
},
TextInputType.numberWithOptions(decimal: true),
const TextInputType.numberWithOptions(decimal: true),
),
_buildTextFormField(
_simulatedLatencyController,
Expand Down Expand Up @@ -839,7 +839,7 @@ class _NetworkConfigInputPageState extends State<NetworkConfigInputPage> {
),
],
);
}).toList(),
}),
Row(
children: [
Expanded(child: Container()),
Expand Down Expand Up @@ -892,7 +892,7 @@ class _NetworkConfigInputPageState extends State<NetworkConfigInputPage> {
),
],
);
}).toList(),
}),
Row(
children: [
Expanded(child: Container()),
Expand Down
4 changes: 3 additions & 1 deletion lib/settings_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ import 'package:vnt_app/data_persistence.dart';
import 'connect_log.dart';

class SettingsPage extends StatefulWidget {
const SettingsPage({super.key});

@override
_SettingsPageState createState() => _SettingsPageState();
}
Expand Down Expand Up @@ -330,7 +332,7 @@ class _SettingsPageState extends State<SettingsPage> {
Navigator.push(
context,
MaterialPageRoute(
builder: (context) => LogPage(),
builder: (context) => const LogPage(),
),
);
},
Expand Down
2 changes: 2 additions & 0 deletions lib/src/rust/api/vnt_api.dart
Original file line number Diff line number Diff line change
Expand Up @@ -230,6 +230,8 @@ enum RustErrorType {
invalidIp,
localIpExists,
unknown,
failedToCrateDevice,
warn,
;
}

Expand Down
2 changes: 1 addition & 1 deletion lib/utils/ip_utils.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class Ipv4Addr {

class IpUtils {
static String toInIpString(int dest, int mask, String ip) {
return '${Ipv4Addr.fromInt(dest).toString()}/${_countBits(mask)},${ip}';
return '${Ipv4Addr.fromInt(dest).toString()}/${_countBits(mask)},$ip';
}

static (int, int, String) parseInIpString(String input) {
Expand Down
3 changes: 2 additions & 1 deletion lib/widgets/color_changing_button.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ class ColorChangingButton extends StatefulWidget {
final List<Color> colors;
final VoidCallback onPressed;

const ColorChangingButton({super.key,
const ColorChangingButton({
super.key,
required this.icon,
required this.colors,
required this.onPressed,
Expand Down
2 changes: 1 addition & 1 deletion lib/widgets/legend_widget.dart
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,4 @@ class Legend {
Legend(this.name, this.color);
final String name;
final Color color;
}
}
Loading