mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-02-23 03:25:26 +00:00
dart fix --apply --code=use_super_parameters
This commit is contained in:
parent
982236f2c9
commit
54b625acfc
40 changed files with 68 additions and 76 deletions
|
@ -8,7 +8,7 @@ import 'IPField.dart';
|
||||||
//TODO: Support initialValue
|
//TODO: Support initialValue
|
||||||
class CIDRField extends StatefulWidget {
|
class CIDRField extends StatefulWidget {
|
||||||
const CIDRField({
|
const CIDRField({
|
||||||
Key? key,
|
super.key,
|
||||||
this.ipHelp = "ip address",
|
this.ipHelp = "ip address",
|
||||||
this.autoFocus = false,
|
this.autoFocus = false,
|
||||||
this.focusNode,
|
this.focusNode,
|
||||||
|
@ -17,7 +17,7 @@ class CIDRField extends StatefulWidget {
|
||||||
this.textInputAction,
|
this.textInputAction,
|
||||||
this.ipController,
|
this.ipController,
|
||||||
this.bitsController,
|
this.bitsController,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final String ipHelp;
|
final String ipHelp;
|
||||||
final bool autoFocus;
|
final bool autoFocus;
|
||||||
|
|
|
@ -6,21 +6,18 @@ import 'package:mobile_nebula/validators/ipValidator.dart';
|
||||||
class CIDRFormField extends FormField<CIDR> {
|
class CIDRFormField extends FormField<CIDR> {
|
||||||
//TODO: onSaved, validator, auto-validate, enabled?
|
//TODO: onSaved, validator, auto-validate, enabled?
|
||||||
CIDRFormField({
|
CIDRFormField({
|
||||||
Key? key,
|
super.key,
|
||||||
autoFocus = false,
|
autoFocus = false,
|
||||||
enableIPV6 = false,
|
enableIPV6 = false,
|
||||||
focusNode,
|
focusNode,
|
||||||
nextFocusNode,
|
nextFocusNode,
|
||||||
ValueChanged<CIDR>? onChanged,
|
ValueChanged<CIDR>? onChanged,
|
||||||
FormFieldSetter<CIDR>? onSaved,
|
super.onSaved,
|
||||||
textInputAction,
|
textInputAction,
|
||||||
CIDR? initialValue,
|
super.initialValue,
|
||||||
this.ipController,
|
this.ipController,
|
||||||
this.bitsController,
|
this.bitsController,
|
||||||
}) : super(
|
}) : super(
|
||||||
key: key,
|
|
||||||
initialValue: initialValue,
|
|
||||||
onSaved: onSaved,
|
|
||||||
validator: (cidr) {
|
validator: (cidr) {
|
||||||
if (cidr == null) {
|
if (cidr == null) {
|
||||||
return "Please fill out this field";
|
return "Please fill out this field";
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class DangerButton extends StatelessWidget {
|
class DangerButton extends StatelessWidget {
|
||||||
const DangerButton({Key? key, required this.child, this.onPressed}) : super(key: key);
|
const DangerButton({super.key, required this.child, this.onPressed});
|
||||||
|
|
||||||
final Widget child;
|
final Widget child;
|
||||||
final GestureTapCallback? onPressed;
|
final GestureTapCallback? onPressed;
|
||||||
|
|
|
@ -6,14 +6,14 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
/// SimplePage with a form and built in validation and confirmation to discard changes if any are made
|
/// SimplePage with a form and built in validation and confirmation to discard changes if any are made
|
||||||
class FormPage extends StatefulWidget {
|
class FormPage extends StatefulWidget {
|
||||||
const FormPage({
|
const FormPage({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.child,
|
required this.child,
|
||||||
required this.onSave,
|
required this.onSave,
|
||||||
required this.changed,
|
required this.changed,
|
||||||
this.hideSave = false,
|
this.hideSave = false,
|
||||||
this.scrollController,
|
this.scrollController,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final String title;
|
final String title;
|
||||||
final Function onSave;
|
final Function onSave;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import 'IPField.dart';
|
||||||
//TODO: Support initialValue
|
//TODO: Support initialValue
|
||||||
class IPAndPortField extends StatefulWidget {
|
class IPAndPortField extends StatefulWidget {
|
||||||
const IPAndPortField({
|
const IPAndPortField({
|
||||||
Key? key,
|
super.key,
|
||||||
this.ipOnly = false,
|
this.ipOnly = false,
|
||||||
this.ipHelp = "ip address",
|
this.ipHelp = "ip address",
|
||||||
this.autoFocus = false,
|
this.autoFocus = false,
|
||||||
|
@ -20,7 +20,7 @@ class IPAndPortField extends StatefulWidget {
|
||||||
this.ipTextAlign,
|
this.ipTextAlign,
|
||||||
this.ipController,
|
this.ipController,
|
||||||
this.portController,
|
this.portController,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final String ipHelp;
|
final String ipHelp;
|
||||||
final bool ipOnly;
|
final bool ipOnly;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import 'IPAndPortField.dart';
|
||||||
class IPAndPortFormField extends FormField<IPAndPort> {
|
class IPAndPortFormField extends FormField<IPAndPort> {
|
||||||
//TODO: onSaved, validator, auto-validate, enabled?
|
//TODO: onSaved, validator, auto-validate, enabled?
|
||||||
IPAndPortFormField({
|
IPAndPortFormField({
|
||||||
Key? key,
|
super.key,
|
||||||
ipOnly = false,
|
ipOnly = false,
|
||||||
enableIPV6 = false,
|
enableIPV6 = false,
|
||||||
ipHelp = "ip address",
|
ipHelp = "ip address",
|
||||||
|
@ -16,17 +16,14 @@ class IPAndPortFormField extends FormField<IPAndPort> {
|
||||||
focusNode,
|
focusNode,
|
||||||
nextFocusNode,
|
nextFocusNode,
|
||||||
ValueChanged<IPAndPort>? onChanged,
|
ValueChanged<IPAndPort>? onChanged,
|
||||||
FormFieldSetter<IPAndPort>? onSaved,
|
super.onSaved,
|
||||||
textInputAction,
|
textInputAction,
|
||||||
IPAndPort? initialValue,
|
super.initialValue,
|
||||||
noBorder,
|
noBorder,
|
||||||
ipTextAlign = TextAlign.center,
|
ipTextAlign = TextAlign.center,
|
||||||
this.ipController,
|
this.ipController,
|
||||||
this.portController,
|
this.portController,
|
||||||
}) : super(
|
}) : super(
|
||||||
key: key,
|
|
||||||
initialValue: initialValue,
|
|
||||||
onSaved: onSaved,
|
|
||||||
validator: (ipAndPort) {
|
validator: (ipAndPort) {
|
||||||
if (ipAndPort == null) {
|
if (ipAndPort == null) {
|
||||||
return "Please fill out this field";
|
return "Please fill out this field";
|
||||||
|
|
|
@ -17,7 +17,7 @@ class IPField extends StatelessWidget {
|
||||||
final textAlign;
|
final textAlign;
|
||||||
|
|
||||||
const IPField({
|
const IPField({
|
||||||
Key? key,
|
super.key,
|
||||||
this.ipOnly = false,
|
this.ipOnly = false,
|
||||||
this.help = "ip address",
|
this.help = "ip address",
|
||||||
this.autoFocus = false,
|
this.autoFocus = false,
|
||||||
|
@ -28,7 +28,7 @@ class IPField extends StatelessWidget {
|
||||||
this.textInputAction,
|
this.textInputAction,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.textAlign = TextAlign.center,
|
this.textAlign = TextAlign.center,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -9,7 +9,7 @@ import 'IPField.dart';
|
||||||
class IPFormField extends FormField<String> {
|
class IPFormField extends FormField<String> {
|
||||||
//TODO: validator, auto-validate, enabled?
|
//TODO: validator, auto-validate, enabled?
|
||||||
IPFormField({
|
IPFormField({
|
||||||
Key? key,
|
super.key,
|
||||||
ipOnly = false,
|
ipOnly = false,
|
||||||
enableIPV6 = false,
|
enableIPV6 = false,
|
||||||
help = "ip address",
|
help = "ip address",
|
||||||
|
@ -17,7 +17,7 @@ class IPFormField extends FormField<String> {
|
||||||
focusNode,
|
focusNode,
|
||||||
nextFocusNode,
|
nextFocusNode,
|
||||||
ValueChanged<String>? onChanged,
|
ValueChanged<String>? onChanged,
|
||||||
FormFieldSetter<String>? onSaved,
|
super.onSaved,
|
||||||
textPadding = const EdgeInsets.all(6.0),
|
textPadding = const EdgeInsets.all(6.0),
|
||||||
textInputAction,
|
textInputAction,
|
||||||
initialValue,
|
initialValue,
|
||||||
|
@ -25,9 +25,7 @@ class IPFormField extends FormField<String> {
|
||||||
crossAxisAlignment = CrossAxisAlignment.center,
|
crossAxisAlignment = CrossAxisAlignment.center,
|
||||||
textAlign = TextAlign.center,
|
textAlign = TextAlign.center,
|
||||||
}) : super(
|
}) : super(
|
||||||
key: key,
|
|
||||||
initialValue: initialValue,
|
initialValue: initialValue,
|
||||||
onSaved: onSaved,
|
|
||||||
validator: (ip) {
|
validator: (ip) {
|
||||||
if (ip == null || ip == "") {
|
if (ip == null || ip == "") {
|
||||||
return "Please fill out this field";
|
return "Please fill out this field";
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:mobile_nebula/components/SpecialTextField.dart';
|
||||||
class PlatformTextFormField extends FormField<String> {
|
class PlatformTextFormField extends FormField<String> {
|
||||||
//TODO: auto-validate, enabled?
|
//TODO: auto-validate, enabled?
|
||||||
PlatformTextFormField({
|
PlatformTextFormField({
|
||||||
Key? key,
|
super.key,
|
||||||
widgetKey,
|
widgetKey,
|
||||||
this.controller,
|
this.controller,
|
||||||
focusNode,
|
focusNode,
|
||||||
|
@ -28,11 +28,9 @@ class PlatformTextFormField extends FormField<String> {
|
||||||
String? initialValue,
|
String? initialValue,
|
||||||
String? placeholder,
|
String? placeholder,
|
||||||
FormFieldValidator<String>? validator,
|
FormFieldValidator<String>? validator,
|
||||||
ValueChanged<String?>? onSaved,
|
super.onSaved,
|
||||||
}) : super(
|
}) : super(
|
||||||
key: key,
|
|
||||||
initialValue: controller != null ? controller.text : (initialValue ?? ''),
|
initialValue: controller != null ? controller.text : (initialValue ?? ''),
|
||||||
onSaved: onSaved,
|
|
||||||
validator: (str) {
|
validator: (str) {
|
||||||
if (validator != null) {
|
if (validator != null) {
|
||||||
return validator(str);
|
return validator(str);
|
||||||
|
|
|
@ -6,7 +6,7 @@ enum SimpleScrollable { none, vertical, horizontal, both }
|
||||||
|
|
||||||
class SimplePage extends StatelessWidget {
|
class SimplePage extends StatelessWidget {
|
||||||
const SimplePage({
|
const SimplePage({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.child,
|
required this.child,
|
||||||
this.leadingAction,
|
this.leadingAction,
|
||||||
|
@ -19,7 +19,7 @@ class SimplePage extends StatelessWidget {
|
||||||
this.onLoading,
|
this.onLoading,
|
||||||
this.alignment,
|
this.alignment,
|
||||||
this.refreshController,
|
this.refreshController,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final Widget title;
|
final Widget title;
|
||||||
final Widget child;
|
final Widget child;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:mobile_nebula/models/Site.dart';
|
||||||
import 'package:mobile_nebula/services/utils.dart';
|
import 'package:mobile_nebula/services/utils.dart';
|
||||||
|
|
||||||
class SiteItem extends StatelessWidget {
|
class SiteItem extends StatelessWidget {
|
||||||
const SiteItem({Key? key, required this.site, this.onPressed}) : super(key: key);
|
const SiteItem({super.key, required this.site, this.onPressed});
|
||||||
|
|
||||||
final Site site;
|
final Site site;
|
||||||
final onPressed;
|
final onPressed;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:flutter_svg/svg.dart';
|
||||||
import '../models/Site.dart';
|
import '../models/Site.dart';
|
||||||
|
|
||||||
class SiteTitle extends StatelessWidget {
|
class SiteTitle extends StatelessWidget {
|
||||||
const SiteTitle({Key? key, required this.site}) : super(key: key);
|
const SiteTitle({super.key, required this.site});
|
||||||
|
|
||||||
final Site site;
|
final Site site;
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,14 @@ import 'package:flutter/material.dart';
|
||||||
|
|
||||||
// This is a button that pushes the bare minimum onto you, it doesn't even respect button themes - unless you tell it to
|
// This is a button that pushes the bare minimum onto you, it doesn't even respect button themes - unless you tell it to
|
||||||
class SpecialButton extends StatefulWidget {
|
class SpecialButton extends StatefulWidget {
|
||||||
const SpecialButton({Key? key, this.child, this.color, this.onPressed, this.useButtonTheme = false, this.decoration})
|
const SpecialButton({
|
||||||
: super(key: key);
|
super.key,
|
||||||
|
this.child,
|
||||||
|
this.color,
|
||||||
|
this.onPressed,
|
||||||
|
this.useButtonTheme = false,
|
||||||
|
this.decoration,
|
||||||
|
});
|
||||||
|
|
||||||
final Widget? child;
|
final Widget? child;
|
||||||
final Color? color;
|
final Color? color;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import 'package:flutter_platform_widgets/flutter_platform_widgets.dart';
|
||||||
/// A normal TextField or CupertinoTextField that looks the same on all platforms
|
/// A normal TextField or CupertinoTextField that looks the same on all platforms
|
||||||
class SpecialTextField extends StatefulWidget {
|
class SpecialTextField extends StatefulWidget {
|
||||||
const SpecialTextField({
|
const SpecialTextField({
|
||||||
Key? key,
|
super.key,
|
||||||
this.placeholder,
|
this.placeholder,
|
||||||
this.suffix,
|
this.suffix,
|
||||||
this.controller,
|
this.controller,
|
||||||
|
@ -28,7 +28,7 @@ class SpecialTextField extends StatefulWidget {
|
||||||
this.keyboardAppearance,
|
this.keyboardAppearance,
|
||||||
this.textAlignVertical,
|
this.textAlignVertical,
|
||||||
this.inputFormatters,
|
this.inputFormatters,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final String? placeholder;
|
final String? placeholder;
|
||||||
final TextEditingController? controller;
|
final TextEditingController? controller;
|
||||||
|
|
|
@ -4,7 +4,7 @@ import 'package:flutter/cupertino.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
class PrimaryButton extends StatelessWidget {
|
class PrimaryButton extends StatelessWidget {
|
||||||
const PrimaryButton({Key? key, required this.child, this.onPressed}) : super(key: key);
|
const PrimaryButton({super.key, required this.child, this.onPressed});
|
||||||
|
|
||||||
final Widget child;
|
final Widget child;
|
||||||
final GestureTapCallback? onPressed;
|
final GestureTapCallback? onPressed;
|
||||||
|
|
|
@ -5,7 +5,7 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
|
|
||||||
// A config item that detects tapping and calls back on a tap
|
// A config item that detects tapping and calls back on a tap
|
||||||
class ConfigButtonItem extends StatelessWidget {
|
class ConfigButtonItem extends StatelessWidget {
|
||||||
const ConfigButtonItem({Key? key, this.content, this.onPressed}) : super(key: key);
|
const ConfigButtonItem({super.key, this.content, this.onPressed});
|
||||||
|
|
||||||
final Widget? content;
|
final Widget? content;
|
||||||
final onPressed;
|
final onPressed;
|
||||||
|
|
|
@ -4,13 +4,13 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
|
|
||||||
class ConfigCheckboxItem extends StatelessWidget {
|
class ConfigCheckboxItem extends StatelessWidget {
|
||||||
const ConfigCheckboxItem({
|
const ConfigCheckboxItem({
|
||||||
Key? key,
|
super.key,
|
||||||
this.label,
|
this.label,
|
||||||
this.content,
|
this.content,
|
||||||
this.labelWidth = 100,
|
this.labelWidth = 100,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
this.checked = false,
|
this.checked = false,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final Widget? label;
|
final Widget? label;
|
||||||
final Widget? content;
|
final Widget? content;
|
||||||
|
|
|
@ -9,7 +9,7 @@ TextStyle basicTextStyle(BuildContext context) =>
|
||||||
const double _headerFontSize = 13.0;
|
const double _headerFontSize = 13.0;
|
||||||
|
|
||||||
class ConfigHeader extends StatelessWidget {
|
class ConfigHeader extends StatelessWidget {
|
||||||
const ConfigHeader({Key? key, required this.label, this.color}) : super(key: key);
|
const ConfigHeader({super.key, required this.label, this.color});
|
||||||
|
|
||||||
final String label;
|
final String label;
|
||||||
final Color? color;
|
final Color? color;
|
||||||
|
|
|
@ -6,12 +6,12 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
|
|
||||||
class ConfigItem extends StatelessWidget {
|
class ConfigItem extends StatelessWidget {
|
||||||
const ConfigItem({
|
const ConfigItem({
|
||||||
Key? key,
|
super.key,
|
||||||
this.label,
|
this.label,
|
||||||
required this.content,
|
required this.content,
|
||||||
this.labelWidth = 100,
|
this.labelWidth = 100,
|
||||||
this.crossAxisAlignment = CrossAxisAlignment.center,
|
this.crossAxisAlignment = CrossAxisAlignment.center,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final Widget? label;
|
final Widget? label;
|
||||||
final Widget content;
|
final Widget content;
|
||||||
|
|
|
@ -7,14 +7,14 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
|
|
||||||
class ConfigPageItem extends StatelessWidget {
|
class ConfigPageItem extends StatelessWidget {
|
||||||
const ConfigPageItem({
|
const ConfigPageItem({
|
||||||
Key? key,
|
super.key,
|
||||||
this.label,
|
this.label,
|
||||||
this.content,
|
this.content,
|
||||||
this.labelWidth = 100,
|
this.labelWidth = 100,
|
||||||
this.onPressed,
|
this.onPressed,
|
||||||
this.disabled = false,
|
this.disabled = false,
|
||||||
this.crossAxisAlignment = CrossAxisAlignment.center,
|
this.crossAxisAlignment = CrossAxisAlignment.center,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final Widget? label;
|
final Widget? label;
|
||||||
final Widget? content;
|
final Widget? content;
|
||||||
|
|
|
@ -4,8 +4,7 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
import 'ConfigHeader.dart';
|
import 'ConfigHeader.dart';
|
||||||
|
|
||||||
class ConfigSection extends StatelessWidget {
|
class ConfigSection extends StatelessWidget {
|
||||||
const ConfigSection({Key? key, this.label, required this.children, this.borderColor, this.labelColor})
|
const ConfigSection({super.key, this.label, required this.children, this.borderColor, this.labelColor});
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
final List<Widget> children;
|
final List<Widget> children;
|
||||||
final String? label;
|
final String? label;
|
||||||
|
|
|
@ -2,11 +2,11 @@ import 'package:flutter/cupertino.dart';
|
||||||
|
|
||||||
class ConfigTextItem extends StatelessWidget {
|
class ConfigTextItem extends StatelessWidget {
|
||||||
const ConfigTextItem({
|
const ConfigTextItem({
|
||||||
Key? key,
|
super.key,
|
||||||
this.placeholder,
|
this.placeholder,
|
||||||
this.controller,
|
this.controller,
|
||||||
this.style = const TextStyle(fontFamily: 'RobotoMono'),
|
this.style = const TextStyle(fontFamily: 'RobotoMono'),
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final String? placeholder;
|
final String? placeholder;
|
||||||
final TextEditingController? controller;
|
final TextEditingController? controller;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
import 'package:package_info_plus/package_info_plus.dart';
|
import 'package:package_info_plus/package_info_plus.dart';
|
||||||
|
|
||||||
class AboutScreen extends StatefulWidget {
|
class AboutScreen extends StatefulWidget {
|
||||||
const AboutScreen({Key? key}) : super(key: key);
|
const AboutScreen({super.key});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
_AboutScreenState createState() => _AboutScreenState();
|
_AboutScreenState createState() => _AboutScreenState();
|
||||||
|
|
|
@ -15,14 +15,14 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
class HostInfoScreen extends StatefulWidget {
|
class HostInfoScreen extends StatefulWidget {
|
||||||
const HostInfoScreen({
|
const HostInfoScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.hostInfo,
|
required this.hostInfo,
|
||||||
required this.isLighthouse,
|
required this.isLighthouse,
|
||||||
required this.pending,
|
required this.pending,
|
||||||
this.onChanged,
|
this.onChanged,
|
||||||
required this.site,
|
required this.site,
|
||||||
required this.supportsQRScanning,
|
required this.supportsQRScanning,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final bool isLighthouse;
|
final bool isLighthouse;
|
||||||
final bool pending;
|
final bool pending;
|
||||||
|
|
|
@ -60,7 +60,7 @@ MAIH7gzreMGgrH/yR6rZpIHR3DxJ3E0aHtEI
|
||||||
};
|
};
|
||||||
|
|
||||||
class MainScreen extends StatefulWidget {
|
class MainScreen extends StatefulWidget {
|
||||||
const MainScreen(this.dnEnrollStream, {Key? key}) : super(key: key);
|
const MainScreen(this.dnEnrollStream, {super.key});
|
||||||
|
|
||||||
final StreamController dnEnrollStream;
|
final StreamController dnEnrollStream;
|
||||||
|
|
||||||
|
|
|
@ -23,8 +23,7 @@ import '../components/SiteTitle.dart';
|
||||||
//TODO: ios is now the problem with connecting screwing our ability to query the hostmap (its a race)
|
//TODO: ios is now the problem with connecting screwing our ability to query the hostmap (its a race)
|
||||||
|
|
||||||
class SiteDetailScreen extends StatefulWidget {
|
class SiteDetailScreen extends StatefulWidget {
|
||||||
const SiteDetailScreen({Key? key, required this.site, this.onChanged, required this.supportsQRScanning})
|
const SiteDetailScreen({super.key, required this.site, this.onChanged, required this.supportsQRScanning});
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
final Site site;
|
final Site site;
|
||||||
final Function? onChanged;
|
final Function? onChanged;
|
||||||
|
|
|
@ -15,7 +15,7 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
import '../components/SiteTitle.dart';
|
import '../components/SiteTitle.dart';
|
||||||
|
|
||||||
class SiteLogsScreen extends StatefulWidget {
|
class SiteLogsScreen extends StatefulWidget {
|
||||||
const SiteLogsScreen({Key? key, required this.site}) : super(key: key);
|
const SiteLogsScreen({super.key, required this.site});
|
||||||
|
|
||||||
final Site site;
|
final Site site;
|
||||||
|
|
||||||
|
|
|
@ -11,13 +11,13 @@ import 'package:pull_to_refresh/pull_to_refresh.dart';
|
||||||
|
|
||||||
class SiteTunnelsScreen extends StatefulWidget {
|
class SiteTunnelsScreen extends StatefulWidget {
|
||||||
const SiteTunnelsScreen({
|
const SiteTunnelsScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.site,
|
required this.site,
|
||||||
required this.tunnels,
|
required this.tunnels,
|
||||||
required this.pending,
|
required this.pending,
|
||||||
required this.onChanged,
|
required this.onChanged,
|
||||||
required this.supportsQRScanning,
|
required this.supportsQRScanning,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final Site site;
|
final Site site;
|
||||||
final List<HostInfo> tunnels;
|
final List<HostInfo> tunnels;
|
||||||
|
|
|
@ -26,13 +26,13 @@ class CertificateResult {
|
||||||
|
|
||||||
class AddCertificateScreen extends StatefulWidget {
|
class AddCertificateScreen extends StatefulWidget {
|
||||||
const AddCertificateScreen({
|
const AddCertificateScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
this.onSave,
|
this.onSave,
|
||||||
this.onReplace,
|
this.onReplace,
|
||||||
required this.pubKey,
|
required this.pubKey,
|
||||||
required this.privKey,
|
required this.privKey,
|
||||||
required this.supportsQRScanning,
|
required this.supportsQRScanning,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
// onSave will pop a new CertificateDetailsScreen.
|
// onSave will pop a new CertificateDetailsScreen.
|
||||||
// If onSave is null, onReplace must be set.
|
// If onSave is null, onReplace must be set.
|
||||||
|
|
|
@ -40,7 +40,7 @@ class Advanced {
|
||||||
}
|
}
|
||||||
|
|
||||||
class AdvancedScreen extends StatefulWidget {
|
class AdvancedScreen extends StatefulWidget {
|
||||||
const AdvancedScreen({Key? key, required this.site, required this.onSave}) : super(key: key);
|
const AdvancedScreen({super.key, required this.site, required this.onSave});
|
||||||
|
|
||||||
final Site site;
|
final Site site;
|
||||||
final ValueChanged<Advanced> onSave;
|
final ValueChanged<Advanced> onSave;
|
||||||
|
|
|
@ -18,7 +18,7 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
//TODO: In addition you will want to think about re-generation while the site is still active (This means storing multiple keys in secure storage)
|
//TODO: In addition you will want to think about re-generation while the site is still active (This means storing multiple keys in secure storage)
|
||||||
|
|
||||||
class CAListScreen extends StatefulWidget {
|
class CAListScreen extends StatefulWidget {
|
||||||
const CAListScreen({Key? key, required this.cas, this.onSave, required this.supportsQRScanning}) : super(key: key);
|
const CAListScreen({super.key, required this.cas, this.onSave, required this.supportsQRScanning});
|
||||||
|
|
||||||
final List<CertificateInfo> cas;
|
final List<CertificateInfo> cas;
|
||||||
final ValueChanged<List<CertificateInfo>>? onSave;
|
final ValueChanged<List<CertificateInfo>>? onSave;
|
||||||
|
|
|
@ -11,7 +11,7 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
/// Displays the details of a CertificateInfo object. Respects incomplete objects (missing validity or rawCert)
|
/// Displays the details of a CertificateInfo object. Respects incomplete objects (missing validity or rawCert)
|
||||||
class CertificateDetailsScreen extends StatefulWidget {
|
class CertificateDetailsScreen extends StatefulWidget {
|
||||||
const CertificateDetailsScreen({
|
const CertificateDetailsScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
required this.certInfo,
|
required this.certInfo,
|
||||||
this.onDelete,
|
this.onDelete,
|
||||||
this.onSave,
|
this.onSave,
|
||||||
|
@ -19,7 +19,7 @@ class CertificateDetailsScreen extends StatefulWidget {
|
||||||
this.pubKey,
|
this.pubKey,
|
||||||
this.privKey,
|
this.privKey,
|
||||||
required this.supportsQRScanning,
|
required this.supportsQRScanning,
|
||||||
}) : super(key: key);
|
});
|
||||||
|
|
||||||
final CertificateInfo certInfo;
|
final CertificateInfo certInfo;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:mobile_nebula/components/config/ConfigCheckboxItem.dart';
|
||||||
import 'package:mobile_nebula/components/config/ConfigSection.dart';
|
import 'package:mobile_nebula/components/config/ConfigSection.dart';
|
||||||
|
|
||||||
class CipherScreen extends StatefulWidget {
|
class CipherScreen extends StatefulWidget {
|
||||||
const CipherScreen({Key? key, required this.cipher, required this.onSave}) : super(key: key);
|
const CipherScreen({super.key, required this.cipher, required this.onSave});
|
||||||
|
|
||||||
final String cipher;
|
final String cipher;
|
||||||
final ValueChanged<String> onSave;
|
final ValueChanged<String> onSave;
|
||||||
|
|
|
@ -6,7 +6,7 @@ import 'package:mobile_nebula/components/config/ConfigCheckboxItem.dart';
|
||||||
import 'package:mobile_nebula/components/config/ConfigSection.dart';
|
import 'package:mobile_nebula/components/config/ConfigSection.dart';
|
||||||
|
|
||||||
class LogVerbosityScreen extends StatefulWidget {
|
class LogVerbosityScreen extends StatefulWidget {
|
||||||
const LogVerbosityScreen({Key? key, required this.verbosity, required this.onSave}) : super(key: key);
|
const LogVerbosityScreen({super.key, required this.verbosity, required this.onSave});
|
||||||
|
|
||||||
final String verbosity;
|
final String verbosity;
|
||||||
final ValueChanged<String> onSave;
|
final ValueChanged<String> onSave;
|
||||||
|
|
|
@ -7,7 +7,7 @@ class RenderedConfigScreen extends StatelessWidget {
|
||||||
final String config;
|
final String config;
|
||||||
final String name;
|
final String name;
|
||||||
|
|
||||||
RenderedConfigScreen({Key? key, required this.config, required this.name}) : super(key: key);
|
RenderedConfigScreen({super.key, required this.config, required this.name});
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
|
|
@ -23,8 +23,7 @@ import 'package:mobile_nebula/services/utils.dart';
|
||||||
//TODO: Enforce a name
|
//TODO: Enforce a name
|
||||||
|
|
||||||
class SiteConfigScreen extends StatefulWidget {
|
class SiteConfigScreen extends StatefulWidget {
|
||||||
const SiteConfigScreen({Key? key, this.site, required this.onSave, required this.supportsQRScanning})
|
const SiteConfigScreen({super.key, this.site, required this.onSave, required this.supportsQRScanning});
|
||||||
: super(key: key);
|
|
||||||
|
|
||||||
final Site? site;
|
final Site? site;
|
||||||
|
|
||||||
|
|
|
@ -21,14 +21,13 @@ class _IPAndPort {
|
||||||
|
|
||||||
class StaticHostmapScreen extends StatefulWidget {
|
class StaticHostmapScreen extends StatefulWidget {
|
||||||
StaticHostmapScreen({
|
StaticHostmapScreen({
|
||||||
Key? key,
|
super.key,
|
||||||
this.nebulaIp = '',
|
this.nebulaIp = '',
|
||||||
destinations,
|
destinations,
|
||||||
this.lighthouse = false,
|
this.lighthouse = false,
|
||||||
this.onDelete,
|
this.onDelete,
|
||||||
required this.onSave,
|
required this.onSave,
|
||||||
}) : this.destinations = destinations ?? [],
|
}) : this.destinations = destinations ?? [];
|
||||||
super(key: key);
|
|
||||||
|
|
||||||
final List<IPAndPort> destinations;
|
final List<IPAndPort> destinations;
|
||||||
final String nebulaIp;
|
final String nebulaIp;
|
||||||
|
|
|
@ -22,7 +22,7 @@ class _Hostmap {
|
||||||
}
|
}
|
||||||
|
|
||||||
class StaticHostsScreen extends StatefulWidget {
|
class StaticHostsScreen extends StatefulWidget {
|
||||||
const StaticHostsScreen({Key? key, required this.hostmap, required this.onSave}) : super(key: key);
|
const StaticHostsScreen({super.key, required this.hostmap, required this.onSave});
|
||||||
|
|
||||||
final Map<String, StaticHost> hostmap;
|
final Map<String, StaticHost> hostmap;
|
||||||
final ValueChanged<Map<String, StaticHost>>? onSave;
|
final ValueChanged<Map<String, StaticHost>>? onSave;
|
||||||
|
|
|
@ -10,7 +10,7 @@ import 'package:mobile_nebula/models/UnsafeRoute.dart';
|
||||||
import 'package:mobile_nebula/services/utils.dart';
|
import 'package:mobile_nebula/services/utils.dart';
|
||||||
|
|
||||||
class UnsafeRouteScreen extends StatefulWidget {
|
class UnsafeRouteScreen extends StatefulWidget {
|
||||||
const UnsafeRouteScreen({Key? key, required this.route, required this.onSave, this.onDelete}) : super(key: key);
|
const UnsafeRouteScreen({super.key, required this.route, required this.onSave, this.onDelete});
|
||||||
|
|
||||||
final UnsafeRoute route;
|
final UnsafeRoute route;
|
||||||
final ValueChanged<UnsafeRoute> onSave;
|
final ValueChanged<UnsafeRoute> onSave;
|
||||||
|
|
|
@ -8,7 +8,7 @@ import 'package:mobile_nebula/screens/siteConfig/UnsafeRouteScreen.dart';
|
||||||
import 'package:mobile_nebula/services/utils.dart';
|
import 'package:mobile_nebula/services/utils.dart';
|
||||||
|
|
||||||
class UnsafeRoutesScreen extends StatefulWidget {
|
class UnsafeRoutesScreen extends StatefulWidget {
|
||||||
const UnsafeRoutesScreen({Key? key, required this.unsafeRoutes, required this.onSave}) : super(key: key);
|
const UnsafeRoutesScreen({super.key, required this.unsafeRoutes, required this.onSave});
|
||||||
|
|
||||||
final List<UnsafeRoute> unsafeRoutes;
|
final List<UnsafeRoute> unsafeRoutes;
|
||||||
final ValueChanged<List<UnsafeRoute>>? onSave;
|
final ValueChanged<List<UnsafeRoute>>? onSave;
|
||||||
|
|
Loading…
Reference in a new issue