-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #22 from Frezyx/dev
0.5.3 update
- Loading branch information
Showing
14 changed files
with
210 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
import 'package:bottom_bar_with_sheet/bottom_bar_with_sheet.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
void main() => runApp(MyApp()); | ||
|
||
class MyApp extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp( | ||
debugShowCheckedModeBanner: false, | ||
home: MyHomePage(), | ||
); | ||
} | ||
} | ||
|
||
class MyHomePage extends StatefulWidget { | ||
@override | ||
_MyHomePageState createState() => _MyHomePageState(); | ||
} | ||
|
||
class _MyHomePageState extends State<MyHomePage> { | ||
int _selectedIndex = 0; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Colors.indigo[900], | ||
body: Padding( | ||
padding: const EdgeInsets.all(36.0).copyWith(top: 60.0), | ||
child: Column( | ||
crossAxisAlignment: CrossAxisAlignment.start, | ||
children: [ | ||
Text( | ||
"Bottom Bar With Sheet", | ||
style: TextStyle( | ||
color: Colors.white, | ||
fontSize: 42.0, | ||
fontWeight: FontWeight.w900, | ||
), | ||
), | ||
SizedBox(height: 10.0), | ||
Text( | ||
"v 0.6.0-beta", | ||
style: TextStyle( | ||
color: Colors.white, | ||
fontSize: 36.0, | ||
fontWeight: FontWeight.w300, | ||
), | ||
), | ||
], | ||
), | ||
), | ||
bottomNavigationBar: Padding( | ||
padding: const EdgeInsets.only(bottom: 30), | ||
child: BottomBarWithSheet( | ||
selectedIndex: _selectedIndex, | ||
sheetChild: Center(child: Text("Place for your another content")), | ||
curve: Curves.easeOutExpo, | ||
duration: Duration(seconds: 1), | ||
bottomBarTheme: BottomBarTheme( | ||
mainButtonPosition: MainButtonPosition.Middle, | ||
selectedItemIconColor: Colors.blue, | ||
selectedItemBackgroundColor: Colors.transparent, | ||
selectedItemIconSize: 20, | ||
decoration: BoxDecoration( | ||
borderRadius: BorderRadius.all(Radius.circular(50.0)), | ||
boxShadow: [ | ||
BoxShadow( | ||
color: Colors.black.withOpacity(0.03), | ||
blurRadius: 15.0, | ||
spreadRadius: 3.0, | ||
offset: Offset(5.0, 5.0), | ||
) | ||
], | ||
), | ||
), | ||
mainActionButton: MainActionButton( | ||
width: 50, | ||
child: FlutterLogo(size: 50), | ||
), | ||
onSelectItem: (index) => setState(() => _selectedIndex = index), | ||
items: [ | ||
BottomBarWithSheetItem(icon: Icons.home), | ||
BottomBarWithSheetItem(icon: Icons.favorite), | ||
BottomBarWithSheetItem(icon: Icons.folder), | ||
BottomBarWithSheetItem(icon: Icons.settings), | ||
], | ||
), | ||
), | ||
); | ||
} | ||
} |
77 changes: 77 additions & 0 deletions
77
example/lib/examples/without_background_bar_items_example.dart
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
import 'package:bottom_bar_with_sheet/bottom_bar_with_sheet.dart'; | ||
import 'package:flutter/material.dart'; | ||
|
||
void main() => runApp(MyApp()); | ||
|
||
class MyApp extends StatelessWidget { | ||
@override | ||
Widget build(BuildContext context) { | ||
return MaterialApp( | ||
debugShowCheckedModeBanner: false, | ||
home: MyHomePage(), | ||
); | ||
} | ||
} | ||
|
||
class MyHomePage extends StatefulWidget { | ||
@override | ||
_MyHomePageState createState() => _MyHomePageState(); | ||
} | ||
|
||
class _MyHomePageState extends State<MyHomePage> { | ||
int _selectedIndex = 0; | ||
|
||
@override | ||
Widget build(BuildContext context) { | ||
return Scaffold( | ||
backgroundColor: Colors.grey[100], | ||
appBar: AppBar( | ||
backgroundColor: Colors.purple, | ||
title: Text('bottom_bar_with_sheet v0.5.3', | ||
style: TextStyle(color: Colors.white)), | ||
), | ||
body: Center(child: Text("Place for your content")), | ||
bottomNavigationBar: BottomBarWithSheet( | ||
selectedIndex: _selectedIndex, | ||
sheetChild: Center( | ||
child: Text("Place for your another content", | ||
style: TextStyle(color: Colors.white))), | ||
bottomBarTheme: BottomBarTheme( | ||
backgroundColor: Colors.purple, | ||
itemIconColor: Colors.white, | ||
selectedItemIconColor: Colors.white, | ||
selectedItemBackgroundColor: Colors.purple, | ||
height: 70, | ||
heightClosed: 80, | ||
mainButtonPosition: MainButtonPosition.Middle, | ||
selectedItemIconSize: 20, | ||
decoration: BoxDecoration( | ||
boxShadow: [ | ||
BoxShadow( | ||
color: Colors.black12, | ||
blurRadius: 10.0, | ||
spreadRadius: 3.0, | ||
offset: Offset(5.0, 5.0), | ||
) | ||
], | ||
), | ||
), | ||
mainActionButton: MainActionButton( | ||
width: 50, | ||
child: Icon( | ||
Icons.menu, | ||
color: Colors.white, | ||
size: 30, | ||
), | ||
), | ||
onSelectItem: (index) => setState(() => _selectedIndex = index), | ||
items: [ | ||
BottomBarWithSheetItem(icon: Icons.people), | ||
BottomBarWithSheetItem(icon: Icons.shopping_cart), | ||
BottomBarWithSheetItem(icon: Icons.settings), | ||
BottomBarWithSheetItem(icon: Icons.favorite), | ||
], | ||
), | ||
); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters