-
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #127 from osociety/custom-subnet
Scan different subnet other than local one
- Loading branch information
Showing
9 changed files
with
140 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import 'package:flutter/material.dart'; | ||
import 'package:vernet/main.dart'; | ||
import 'package:vernet/ui/base_settings_dialog.dart'; | ||
import 'package:vernet/values/strings.dart'; | ||
|
||
class CustomSubnetDialog extends StatefulWidget { | ||
const CustomSubnetDialog({super.key}); | ||
|
||
@override | ||
State<CustomSubnetDialog> createState() => _CustomSubnetDialogState(); | ||
} | ||
|
||
class _CustomSubnetDialogState extends BaseSettingsDialog<CustomSubnetDialog> { | ||
@override | ||
String getDialogTitle() { | ||
return StringValue.customSubnet; | ||
} | ||
|
||
@override | ||
String getHintText() { | ||
return StringValue.customSubnetHint; | ||
} | ||
|
||
@override | ||
String getInitialValue() { | ||
return appSettings.customSubnet; | ||
} | ||
|
||
@override | ||
TextInputType getKeyBoardType() { | ||
return TextInputType.number; | ||
} | ||
|
||
@override | ||
void onSubmit(String value) { | ||
if (value != appSettings.customSubnet) { | ||
appSettings.setCustomSubnet(value); | ||
} | ||
} | ||
|
||
@override | ||
String? validate(String? value) { | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters