This flutter plugin helps to open only on Android devices. The iOS section has not implemented this plugin.
Add Package in Main Dart File
At the main dart file enter the basic package,
import ‘package:flutter/material.dart’; import 'package:flutter/services.dart';
Install Access_Settings_menu in pubspec.yaml File
- Open pubspec.yaml file.
- Find “Dependencies”.
- Under “cupertino_icons: ^0.1.2” enter the code,
Access_settings_menu: ^0.0.1
After entering this tap, “packages get”.
Import the Access_Settings_menu in the Main dart File
Enter the package under the basic package,
import 'package:access_settings_menu/access_settings_menu.dart';
Create a Class file at the main dart
class MyApp extends StatefulWidget { @override _MyAppState createState() => new _MyAppState(); }
Create a Settings App Bar
return new MaterialApp( home: new Scaffold( appBar: new AppBar( title: new Text('Settings'), ),
Create Settings Types
class _MyAppState extends State<MyApp> { var _settingsTypes = <String>[ 'ACTION_SETTINGS', 'ACTION_DISPLAY_SETTINGS', ];
To Create Drop Down Menu
Widget build(BuildContext context) { var dropdown = new ListView( children: [ new Column( children: <Widget>[ new Text('Settings'), new DropdownButton<String>( items: _settingsTypes.map((String value) { return new DropdownMenuItem<String>( value: value, child: new Text(value), );
To Select the Settings App
onChanged: (selectedValue) { openSettingsMenu(selectedValue);