Created
April 12, 2024 15:24
-
-
Save ashraf267/c0d12258376cf73a482a2ba4a184ffd9 to your computer and use it in GitHub Desktop.
do-wifi: this version worked fine
This file contains hidden or 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
import 'package:flutter/material.dart'; | |
import 'package:app_settings/app_settings.dart'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( | |
debugShowCheckedModeBanner: false, | |
home: Scaffold( | |
body: Center( | |
child: Column( | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
MaterialButton( | |
color: Colors.green, | |
onPressed: () { | |
AppSettings.openAppSettings(type: AppSettingsType.hotspot); | |
}, | |
child: const Text( | |
'Open settings', | |
style: TextStyle( | |
color: Colors.white, | |
), | |
), | |
), | |
], | |
), | |
), | |
), | |
); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment