flutter_cupertino_settings 0.5.0 copy "flutter_cupertino_settings: ^0.5.0" to clipboard
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 #

50
likes
85
pub points
71%
popularity

Publisher

verified publishermatthi.net

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

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

cupertino_icons, flutter

More

Packages that depend on flutter_cupertino_settings