dynamic_appbar 1.0.1 copy "dynamic_appbar: ^1.0.1" to clipboard
dynamic_appbar: ^1.0.1 copied to clipboard

A Flutter package for a dynamic app bar that hides and shows based on scroll position, with customizable options.

example/lib/main.dart

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

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Dynamic AppBar Demo',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(seedColor: Colors.deepPurple),
        useMaterial3: true,
      ),
      home: const MyHomePage(),
    );
  }
}

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

  static const double _appBarHeight = 60;

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      body: DynamicAppBarView(
        title: const Text('Dynamic AppBar',
            style: TextStyle(color: Colors.white, fontSize: 23)),
        appBarHeight: _appBarHeight,
        appBarColor: Colors.blue,
        leftButton: const Icon(Icons.star, color: Colors.white),
        rightButton: IconButton(
            onPressed: () {/* Triggers function */},
            icon: const Icon(Icons.menu, color: Colors.white)),
        child: ListView.builder(
          padding: const EdgeInsets.only(top: _appBarHeight),
          itemCount: 100,
          itemBuilder: (context, index) {
            return ListTile(
              title: Text('Item $index'),
            );
          },
        ),
      ),
    );
  }
}
6
likes
0
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

A Flutter package for a dynamic app bar that hides and shows based on scroll position, with customizable options.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter

More

Packages that depend on dynamic_appbar