Skip to main content

glass_menu 1.0.2 copy "glass_menu: ^1.0.2" to clipboard
glass_menu: ^1.0.2 copied to clipboard

A customizable frosted glass (liquid glassmorphism) navigation bar for Flutter supporting wrap content, expandable animations, and custom positioning.

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'screens/home_feed_screen.dart';

void main() {
  WidgetsFlutterBinding.ensureInitialized();
  SystemChrome.setSystemUIOverlayStyle(
    const SystemUiOverlayStyle(
      statusBarColor: Colors.transparent,
      statusBarIconBrightness: Brightness.dark,
      statusBarBrightness: Brightness.light,
    ),
  );
  runApp(const GlassMenuApp());
}

class GlassMenuApp extends StatefulWidget {
  const GlassMenuApp({super.key});

  @override
  State<GlassMenuApp> createState() => _GlassMenuAppState();
}

class _GlassMenuAppState extends State<GlassMenuApp> {
  ThemeMode _themeMode = ThemeMode.light;

  void _toggleTheme(bool isDark) {
    setState(() {
      _themeMode = isDark ? ThemeMode.dark : ThemeMode.light;
    });
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'Glass Menu Demo',
      debugShowCheckedModeBanner: false,
      themeMode: _themeMode,
      theme: ThemeData(
        useMaterial3: true,
        brightness: Brightness.light,
        scaffoldBackgroundColor: Colors.white,
        colorScheme: ColorScheme.fromSeed(
          seedColor: const Color(0xFFC41200),
          brightness: Brightness.light,
        ),
      ),
      darkTheme: ThemeData(
        useMaterial3: true,
        brightness: Brightness.dark,
        scaffoldBackgroundColor: const Color(0xFF0F0F0F),
        colorScheme: ColorScheme.fromSeed(
          seedColor: const Color(0xFFC41200),
          brightness: Brightness.dark,
        ),
      ),
      home: HomeFeedScreen(
        isDarkMode: _themeMode == ThemeMode.dark,
        onThemeModeChanged: _toggleTheme,
      ),
    );
  }
}
1
likes
160
points
401
downloads
screenshot

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

A customizable frosted glass (liquid glassmorphism) navigation bar for Flutter supporting wrap content, expandable animations, and custom positioning.

Repository (GitHub)
View/report issues

Topics

#navigation #glassmorphism #menu #frosted-glass #ui

License

MIT (license)

Dependencies

flutter

More

Packages that depend on glass_menu