convex_bottom_bar_renew 1.0.0
convex_bottom_bar_renew: ^1.0.0 copied to clipboard
Show a convex tab in the bottom bar. Theming supported.
import 'package:convex_bottom_bar_renew/convex_bottom_bar_renew.dart';
import 'package:flutter/material.dart';
void main() {
runApp(const MyApp());
}
class MyApp extends StatefulWidget {
const MyApp({super.key});
@override
State<MyApp> createState() => _MyAppState();
}
class _MyAppState extends State<MyApp> {
@override
void initState() {
super.initState();
}
@override
Widget build(BuildContext context) {
return MaterialApp(
initialRoute: "/",
routes: {
"/": (_) => const HelloConvexAppBar(),
},
);
}
}
class HelloConvexAppBar extends StatelessWidget {
const HelloConvexAppBar({super.key});
@override
Widget build(BuildContext context) {
return Scaffold(
appBar: AppBar(title: const Text('Hello ConvexAppBar')),
body: Center(
child: TextButton(
child: const Text('Click to show full example'),
onPressed: () => Navigator.of(context).pushNamed('/bar'),
)),
bottomNavigationBar: ConvexAppBar(
style: TabStyle.react,
items: const [
TabItem(icon: Icons.list),
TabItem(icon: Icons.calendar_today),
TabItem(icon: Icons.assessment),
],
initialActiveIndex: 1,
onTap: (int i) => print('click index=$i'),
),
);
}
}