flutter_cupertino_settings 0.5.0 icon indicating copy to clipboard operation
flutter_cupertino_settings: ^0.5.0 copied to clipboard

Flutter widget to create an iOS settings-table (static TableView).

flutter_cupertino_settings #

Pub badge

A Flutter widget to create an iOS settings-table (static TableView).


import 'package:flutter_cupertino_settings/flutter_cupertino_settings.dart';

CSWidgetStyle brightnessStyle = const CSWidgetStyle(
    icon: const Icon(Icons.brightness_medium, color: Colors.black54)
);

CupertinoSettings(
    items: <Widget>[
        const CSHeader('Brightness'),
        CSWidget(CupertinoSlider(value: 0.5), style: brightnessStyle),
        CSControl(
            nameWidget: Text('Auto brightness'),
            contentWidget: CupertinoSwitch(value: true), 
            style: brightnessStyle,
        ),
        CSHeader('Selection'),
        CSSelection<int>(
            items: const <CSSelectionItem<int>>[
                CSSelectionItem<int>(text: 'Day mode', value: 0),
                CSSelectionItem<int>(text: 'Night mode', value: 1),
            ],
            onSelected: (index) {print(index);},
            currentSelection: 0,
        ),
        CSDescription('Using Night mode extends battery life on devices with OLED display',),
        const CSHeader(''),
        CSControl(
            nameWidget: Text('Loading...'), 
            contentWidget: CupertinoActivityIndicator(),
        ),
        CSButton(CSButtonType.DEFAULT, "Licenses", (){ print("It works!"); }),
        const CSHeader(''),
        CSButton(CSButtonType.DESTRUCTIVE, "Delete all data", (){})
    ]
);

Contributors #

45
likes
125
pub points
80%
popularity

Publisher

verified publisher iconmatthi.net

Flutter widget to create an iOS settings-table (static TableView).

Homepage

Documentation

API reference

License

Icon for licenses.MIT (LICENSE)

Dependencies

cupertino_icons, flutter

More

Packages that depend on flutter_cupertino_settings