card_settings 1.9.5 copy "card_settings: ^1.9.5" to clipboard
card_settings: ^1.9.5 copied to clipboard

outdated

A flutter package for building card based settings forms. This includes a library of pre-built form field widgets.

example/lib/main.dart

import 'package:dynamic_theme/dynamic_theme.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter/cupertino.dart';

import 'example.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
  @override
  Widget build(BuildContext context) {
    return DynamicTheme(
        defaultBrightness: Brightness.light,
        data: (brightness) => _buildTheme(brightness),
        themedWidgetBuilder: (context, theme) {
          return MaterialApp(
            title: 'Card Settings Example',
            home: PonyExample(),
            theme: theme,
          );
        });
  }
}

ThemeData _buildTheme(Brightness brightness) {
  switch (brightness) {
    case Brightness.light:
      return ThemeData(
        primaryColor: Colors.teal, // app header background
        secondaryHeaderColor: Colors.indigo[400], // card header background
        cardColor: Colors.white, // card field background
        backgroundColor: Colors.indigo[100], // app background color
        buttonColor: Colors.lightBlueAccent[100], // button background color
        textTheme: TextTheme(
          button: TextStyle(color: Colors.deepPurple[900]), // button text
          subtitle1: TextStyle(color: Colors.grey[800]), // input text
          headline6: TextStyle(color: Colors.white), // card header text
        ),
        primaryTextTheme: TextTheme(
          headline6: TextStyle(color: Colors.lightBlue[50]), // app header text
        ),
        inputDecorationTheme: InputDecorationTheme(
          labelStyle: TextStyle(color: Colors.indigo[400]), // style for labels
        ),
      );
    default:
      return ThemeData(
        primarySwatch: Colors.teal,
        brightness: brightness,
        visualDensity: VisualDensity.adaptivePlatformDensity,
      );
  }
}
238
likes
0
pub points
82%
popularity

Publisher

unverified uploader

A flutter package for building card based settings forms. This includes a library of pre-built form field widgets.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

cupertino_icons, file_picker_cross, flutter, flutter_cupertino_settings, flutter_masked_text, flutter_material_pickers, intl, meta

More

Packages that depend on card_settings