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

flutter_neumorphisms package. You can develope beautiful UI/UX

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'home_screen.dart';
import 'music_screen.dart';
import 'profile_screen.dart';

const _bg = Color(0xFFE8EDF2);

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

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

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      debugShowCheckedModeBanner: false,
      title: 'Flutter Neumorphism UI',
      theme: ThemeData(
        colorScheme: ColorScheme.fromSeed(
            seedColor: const Color(0xFF6C63FF),
            brightness: Brightness.light),
        useMaterial3: true,
        scaffoldBackgroundColor: _bg,
      ),
      home: const MainScreen(),
    );
  }
}

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

  @override
  State<MainScreen> createState() => _MainScreenState();
}

class _MainScreenState extends State<MainScreen> {
  int _index = 0;

  static const _screens = [
    HomeScreen(),
    MusicScreen(),
    ProfileScreen(),
  ];

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      backgroundColor: _bg,
      body: _screens[_index],
      bottomNavigationBar: _buildNavBar(),
    );
  }

  Widget _buildNavBar() {
    return Container(
      decoration: const BoxDecoration(
        color: _bg,
        boxShadow: [
          BoxShadow(
              color: Color(0xFFB8C0CC), offset: Offset(0, -3), blurRadius: 16),
          BoxShadow(color: Colors.white, offset: Offset(0, -1), blurRadius: 8),
        ],
      ),
      child: BottomNavigationBar(
        currentIndex: _index,
        onTap: (i) => setState(() => _index = i),
        backgroundColor: Colors.transparent,
        elevation: 0,
        selectedItemColor: const Color(0xFF6C63FF),
        unselectedItemColor: const Color(0xFF9EAFC2),
        type: BottomNavigationBarType.fixed,
        selectedLabelStyle: const TextStyle(fontWeight: FontWeight.w600),
        items: const [
          BottomNavigationBarItem(
              icon: Icon(Icons.home_rounded), label: 'Home'),
          BottomNavigationBarItem(
              icon: Icon(Icons.music_note_rounded), label: 'Music'),
          BottomNavigationBarItem(
              icon: Icon(Icons.person_rounded), label: 'Profile'),
        ],
      ),
    );
  }
}
6
likes
150
points
138
downloads

Documentation

API reference

Publisher

verified publishersanjaysharma.info

Weekly Downloads

flutter_neumorphisms package. You can develope beautiful UI/UX

Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

flutter

More

Packages that depend on flutter_neumorphism_ui