Skip to content

Commit

Permalink
remove unnessary code
Browse files Browse the repository at this point in the history
  • Loading branch information
shakeebkhan66 committed Jun 3, 2024
1 parent 7d8a6f0 commit 7321cae
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 826 deletions.
4 changes: 1 addition & 3 deletions lib/screens/mobile/mobile_home.dart
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import "dart:io" show Platform;
import "package:flutter/foundation.dart" show kIsWeb;
import "package:flutter/material.dart";
import "package:provider/provider.dart";
Expand Down Expand Up @@ -120,8 +119,7 @@ class _MobileHomeScaffoldState extends State<MobileHomeScaffold> with TickerProv
),
automaticallyImplyLeading: false,
actions: [
if (!kIsWeb &&
(Platform.isAndroid || Platform.isIOS || Platform.isWindows || Platform.isLinux || Platform.isMacOS))
if (!kIsWeb)
Consumer<RouterToggleSwitchProvider>(
builder: (context, routerResult, _) {
var scaffoldMessenger = ScaffoldMessenger.of(context);
Expand Down
64 changes: 0 additions & 64 deletions lib/screens/mobile/router_dialogbox.dart
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import "dart:async";

import "package:flutter/material.dart";
import "package:provider/provider.dart";
import "package:wick_ui/constants.dart";
Expand Down Expand Up @@ -297,68 +296,5 @@ class _RouterDialogBoxState extends State<RouterDialogBox> {
),
),
);

// return InkWell(
// onTap: () async {
// final scaffoldMessenger = ScaffoldMessenger.of(context);
// if (_formKey.currentState!.validate()) {
// switchProvider.setServerStarted(started: true);
// final realms = realmProvider.realmControllers.map((controller) => controller.text).toList();
// final host = realmProvider.hostController.text.trim();
// int port;
// try {
// port = int.parse(realmProvider.portController.text);
// final router = startRouter(
// host,
// port,
// realms,
// );
// routerProvider.setServerRouter(router);
// // unawaited(router.start(host, port));
// await router.start(host, port).timeout(const Duration(seconds: 2)).onError((error, stackTrace) {
//
// });
// realmProvider.resetControllers();
// scaffoldMessenger.showSnackBar(
// SnackBar(
// content: Text(
// "Server is running on this host localhost: $host and on this port $port",
// ),
// duration: const Duration(seconds: 3),
// ),
// );
// await Navigator.pushReplacement(
// context,
// MaterialPageRoute(builder: (context) => const MobileHomeScaffold()),
// );
// } on Exception catch (e) {
// scaffoldMessenger.showSnackBar(
// SnackBar(
// content: Text("Error is: $e"),
// duration: const Duration(seconds: 3),
// ),
// );
// }
// }
// },
// child: Container(
// height: 35,
// width: 100,
// alignment: Alignment.center,
// decoration: BoxDecoration(
// borderRadius: BorderRadius.circular(5),
// gradient: const LinearGradient(
// colors: [
// Colors.blueAccent,
// Colors.lightBlue,
// ],
// ),
// ),
// child: Text(
// "Start",
// style: TextStyle(color: whiteColor, fontSize: 18, fontWeight: FontWeight.bold),
// ),
// ),
// );
}
}
Loading

0 comments on commit 7321cae

Please sign in to comment.