Remove dead/unused code
This commit is contained in:
parent
35fbf86c8c
commit
428ecbdc3d
|
@ -4,7 +4,6 @@ import 'package:flutter/gestures.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter/services.dart';
|
import 'package:flutter/services.dart';
|
||||||
import 'package:flutter_platform_widgets/flutter_platform_widgets.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:mobile_nebula/components/SimplePage.dart';
|
||||||
import 'package:url_launcher/url_launcher.dart';
|
import 'package:url_launcher/url_launcher.dart';
|
||||||
|
@ -152,8 +151,6 @@ class _EnrollmentScreenState extends State<EnrollmentScreen> {
|
||||||
]));
|
]));
|
||||||
}
|
}
|
||||||
|
|
||||||
final dnIcon =
|
|
||||||
Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg';
|
|
||||||
return SimplePage(
|
return SimplePage(
|
||||||
title: Text('Enroll with Managed Nebula', style: TextStyle(fontWeight: FontWeight.bold)),
|
title: Text('Enroll with Managed Nebula', style: TextStyle(fontWeight: FontWeight.bold)),
|
||||||
child: Padding(child: child, padding: EdgeInsets.symmetric(horizontal: 10)),
|
child: Padding(child: child, padding: EdgeInsets.symmetric(horizontal: 10)),
|
||||||
|
|
|
@ -14,7 +14,6 @@ import 'package:mobile_nebula/models/IPAndPort.dart';
|
||||||
import 'package:mobile_nebula/models/Site.dart';
|
import 'package:mobile_nebula/models/Site.dart';
|
||||||
import 'package:mobile_nebula/models/StaticHosts.dart';
|
import 'package:mobile_nebula/models/StaticHosts.dart';
|
||||||
import 'package:mobile_nebula/models/UnsafeRoute.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/SettingsScreen.dart';
|
||||||
import 'package:mobile_nebula/screens/SiteDetailScreen.dart';
|
import 'package:mobile_nebula/screens/SiteDetailScreen.dart';
|
||||||
import 'package:mobile_nebula/screens/siteConfig/SiteConfigScreen.dart';
|
import 'package:mobile_nebula/screens/siteConfig/SiteConfigScreen.dart';
|
||||||
|
@ -303,15 +302,11 @@ class _MainScreenState extends State<MainScreen> {
|
||||||
_loadSites() async {
|
_loadSites() async {
|
||||||
//TODO: This can throw, we need to show an error dialog
|
//TODO: This can throw, we need to show an error dialog
|
||||||
Map<String, dynamic> rawSites = jsonDecode(await platform.invokeMethod('listSites'));
|
Map<String, dynamic> rawSites = jsonDecode(await platform.invokeMethod('listSites'));
|
||||||
bool hasErrors = false;
|
|
||||||
|
|
||||||
sites = [];
|
sites = [];
|
||||||
rawSites.forEach((id, rawSite) {
|
rawSites.forEach((id, rawSite) {
|
||||||
try {
|
try {
|
||||||
var site = Site.fromJson(rawSite);
|
var site = Site.fromJson(rawSite);
|
||||||
if (site.errors.length > 0) {
|
|
||||||
hasErrors = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
//TODO: we need to cancel change listeners when we rebuild
|
//TODO: we need to cancel change listeners when we rebuild
|
||||||
site.onChange().listen((_) {
|
site.onChange().listen((_) {
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
|
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_svg/svg.dart';
|
|
||||||
import 'package:mobile_nebula/components/SimplePage.dart';
|
import 'package:mobile_nebula/components/SimplePage.dart';
|
||||||
import 'package:mobile_nebula/components/config/ConfigItem.dart';
|
import 'package:mobile_nebula/components/config/ConfigItem.dart';
|
||||||
import 'package:mobile_nebula/components/config/ConfigPageItem.dart';
|
import 'package:mobile_nebula/components/config/ConfigPageItem.dart';
|
||||||
|
@ -86,8 +85,6 @@ class _SettingsScreenState extends State<SettingsScreen> {
|
||||||
)),
|
)),
|
||||||
));
|
));
|
||||||
|
|
||||||
final dnIcon =
|
|
||||||
Theme.of(context).brightness == Brightness.dark ? 'images/dn-logo-dark.svg' : 'images/dn-logo-light.svg';
|
|
||||||
items.add(ConfigSection(children: [
|
items.add(ConfigSection(children: [
|
||||||
ConfigPageItem(
|
ConfigPageItem(
|
||||||
label: Text('Enroll with Managed Nebula'),
|
label: Text('Enroll with Managed Nebula'),
|
||||||
|
|
|
@ -23,7 +23,6 @@ bool ipValidator(String? str, bool enableIPV6) {
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue