flutter_corner_banner 1.0.0 copy "flutter_corner_banner: ^1.0.0" to clipboard
flutter_corner_banner: ^1.0.0 copied to clipboard

A widget that build a custom child with banner at the corner contain text or icons.

example/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Banner Demo',
      theme: ThemeData.light(),
      home: const DemoView(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: Colors.white,
      appBar: AppBar(
        title: const Text("Corner Banner"),
      ),
      body: Center(
        child: BannerWidget(
          showBanner: true,
          bannerPosition: BannerPosition.topRight,
          bannerText: 'Banner',
          bannerSize: 80.0,
          bannerColor: Colors.red,
          child: Container(
            decoration: const BoxDecoration(color: Colors.white),
            width: 200,
            height: 200,
          ),
        ),
      ),
    );
  }
}
3
likes
160
pub points
78%
popularity

Publisher

verified publisherhappy-flutter.com

A widget that build a custom child with banner at the corner contain text or icons.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_corner_banner