reusable_app_bar 0.0.6 copy "reusable_app_bar: ^0.0.6" to clipboard
reusable_app_bar: ^0.0.6 copied to clipboard

A customizable Flutter package providing advanced AppBar widgets with flexible layouts, profile avatars, background images, and more.

example/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Reusable App Bar Demo',
      theme: ThemeData(primarySwatch: Colors.teal),
      home: const HomeScreen(),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: const AppSimpleAppBar(
        title: 'Home',
        centerTitle: true,
        backgroundColor: Colors.teal,
        actions: [
          IconButton(
            icon: Icon(Icons.search),
            onPressed: null, // Replace with your logic
          ),
        ],
      ),
      body: Center(
        child: ElevatedButton(
          child: const Text('Go to Profile'),
          onPressed: () {
            Navigator.push(
              context,
              MaterialPageRoute(builder: (context) => const ProfileScreen()),
            );
          },
        ),
      ),
    );
  }
}

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

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: const StackedAvatarAppBar(
        title: 'Profile',
        backgroundColor: Colors.teal,
        imageSource: 'https://via.placeholder.com/150',
        imgRadius: 40,
        isCenterAvatar: true,
      ),
      body: const Center(child: Text('User Profile Page')),
    );
  }
}
0
likes
160
points
8
downloads

Publisher

unverified uploader

Weekly Downloads

A customizable Flutter package providing advanced AppBar widgets with flexible layouts, profile avatars, background images, and more.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

bloc, flutter, flutter_bloc, reusable_image_widget, text_field_builder

More

Packages that depend on reusable_app_bar