cupertino_notification_bar_ui 1.0.101 copy "cupertino_notification_bar_ui: ^1.0.101" to clipboard
cupertino_notification_bar_ui: ^1.0.101 copied to clipboard

Flutter package for a UI design similar to iOS Notification Center.

example/lib/main.dart

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

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

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

  // This widget is the root of your application.
  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Flutter Demo',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const MyHomePage(title: 'Flutter Demo Home Page'),
    );
  }
}

class MyHomePage extends StatefulWidget {
  const MyHomePage({super.key, required this.title});
  final String title;

  @override
  State<MyHomePage> createState() => _MyHomePageState();
}

class _MyHomePageState extends State<MyHomePage> {
  // define `StackItems` here.
  // afternatively you can use Containers with height to 75px
  final stackItems = [
    StackedListItem(
      leading: const CircleAvatar(
          backgroundImage: NetworkImage(
              "https://cdn.pixabay.com/photo/2014/02/27/16/10/flowers-276014_960_720.jpg")),
      title: "Hi",
      subtitle: const Text("It's nice to see you here"),
      trailing: const Icon(Icons.link_rounded),
    ),
    StackedListItem(
      leading: const CircleAvatar(
          backgroundImage: NetworkImage(
              "https://cdn.pixabay.com/photo/2014/02/27/16/10/flowers-276014_960_720.jpg")),
      title: "This happens to be my first open-source",
      subtitle: const Text("We all start somewhere, right?"),
      trailing: const Icon(Icons.link_rounded),
    ),
    StackedListItem(
      leading: const CircleAvatar(
          backgroundImage: NetworkImage(
              "https://cdn.pixabay.com/photo/2014/02/27/16/10/flowers-276014_960_720.jpg")),
      title: "Thanks for checking this out!",
      subtitle: const Text("Happy coding :)"),
      trailing: const Icon(Icons.link_rounded),
    )
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        backgroundColor: Colors.deepOrange.shade200,
        appBar: AppBar(
          title: Text(widget.title),
        ),
        body: StackedList(children: stackItems));
  }
}
4
likes
160
pub points
57%
popularity

Publisher

unverified uploader

Flutter package for a UI design similar to iOS Notification Center.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on cupertino_notification_bar_ui