enough_platform_widgets 1.1.1 copy "enough_platform_widgets: ^1.1.1" to clipboard
enough_platform_widgets: ^1.1.1 copied to clipboard

Useful platform aware widgets to develop a Flutter app with either Cupertino and Material design.

example/enough_platform_widgets_example.dart

import 'package:enough_platform_widgets/enough_platform_widgets.dart';
import 'package:flutter/material.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return PlatformApp(
      title: 'Platform App Example',
      material: (context, platform) => MaterialAppData(
        theme: ThemeData(
          primarySwatch: Colors.blue,
        ),
      ),
      home: const MyHomePage(),
    );
  }
}

class MyHomePage extends StatelessWidget {
  const MyHomePage({super.key});

  @override
  Widget build(BuildContext context) => PlatformScaffold(
        appBar: PlatformAppBar(
          title: Text('Hello World'),
        ),
        body: Column(
          crossAxisAlignment: CrossAxisAlignment.start,
          children: [
            Expanded(
              child: ListView(
                children: [
                  SelectablePlatformListTile(
                    title: Text('List Tile 1'),
                  ),
                  SelectablePlatformListTile(
                    title: Text('List Tile 2'),
                  ),
                  SelectablePlatformListTile(
                    title: Text('List Tile 3'),
                  ),
                ],
              ),
            ),
          ],
        ),
      );
}
36
likes
140
pub points
85%
popularity

Publisher

verified publisherenough.de

Useful platform aware widgets to develop a Flutter app with either Cupertino and Material design.

Repository (GitHub)
View/report issues

Topics

#cupertino #material #widget

Documentation

API reference

License

MIT (license)

Dependencies

cupertino_progress_bar, cupertino_stepper, flutter, flutter_platform_widgets

More

Packages that depend on enough_platform_widgets