Skip to content

Instantly share code, notes, and snippets.

@ashraf267
Created April 12, 2024 15:24
Show Gist options
  • Save ashraf267/c0d12258376cf73a482a2ba4a184ffd9 to your computer and use it in GitHub Desktop.
Save ashraf267/c0d12258376cf73a482a2ba4a184ffd9 to your computer and use it in GitHub Desktop.
do-wifi: this version worked fine
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