flutter_icon_snackbar 1.1.7 copy "flutter_icon_snackbar: ^1.1.7" to clipboard
flutter_icon_snackbar: ^1.1.7 copied to clipboard

Flutter icon snackbar | Animated snackbar with icons | Easier snackbar over native

example/example.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'IconDialog Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const ExamplePage(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: const Text('Icon SnackBar'),
      ),
      body: Center(
        child: Column(
          mainAxisAlignment: MainAxisAlignment.center,
          children: <Widget>[
            ElevatedButton(
                onPressed: () {
                  IconSnackBar.show(
                    context,
                    snackBarType: SnackBarType.fail,
                    snackBarStyle: const SnackBarStyle(
                      maxLines: 1,
                    ),
                    label: 'Data required',
                  );
                },
                child: const Text("test"))
          ],
        ),
      ),
    );
  }
}
11
likes
130
pub points
86%
popularity

Publisher

verified publishertyrannoapartment.com

Flutter icon snackbar | Animated snackbar with icons | Easier snackbar over native

Homepage
Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

cupertino_icons, flutter, icon_animated

More

Packages that depend on flutter_icon_snackbar