Flutter: Access Android Settings Menu

Access Android Setting menu in FlutterPin

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

  1. Open pubspec.yaml file.
  2. Find “Dependencies”.
  3. Under “cupertino_icons: ^0.1.2” enter the code,
Access_settings_menu: ^0.0.1

Install Access_Settings_menu in pubspec.yaml FilePinAfter 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'),
        ),

 Settings App BarPinCreate 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),
               );

Drop Down MenuPinTo Select the Settings App

onChanged: (selectedValue) {
                openSettingsMenu(selectedValue);

About The Author

Scroll to Top
Share to...