Skip to content

Commit

Permalink
update readme to 0.6.0, refactor some codes
Browse files Browse the repository at this point in the history
  • Loading branch information
Jamalianpour committed Mar 17, 2024
1 parent aaa322c commit 5f9a0f2
Show file tree
Hide file tree
Showing 15 changed files with 257 additions and 210 deletions.
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
## [0.6.0]
* **New Features**
* Add expansion item -> `SideMenuExpansionItem`
* Add Hamburger Icon [#77](https://github.com/Jamalianpour/easy_sidemenu/pull/77)

* Fix: width not being returned on 2nd load [#61](https://github.com/Jamalianpour/easy_sidemenu/pull/61)
* Refactor codes

## [0.5.0]
* **Braking**: priority has been removed from `SideMenuItem`
* builder has been changed and now can use any widget as `SideMenuItem`
Expand Down
38 changes: 30 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ You can see web demo here: [https://jamalianpour.github.io/easy_sidemenu](https:

```yaml
dependencies:
easy_sidemenu: ^0.5.0
easy_sidemenu: ^0.6.0
```
Run `flutter packages get` in the root directory of your app.
Expand Down Expand Up @@ -68,12 +68,25 @@ List<SideMenuItem> items = [
style: TextStyle(color: Colors.white),
),
),
SideMenuItem(
title: 'Settings',
onTap: (index, _) {
sideMenu.changePage(index);
},
icon: Icon(Icons.settings),
SideMenuExpansionItem(
title: "Expansion Item",
icon: const Icon(Icons.kitchen),
children: [
SideMenuItem(
title: 'Expansion Item 1',
onTap: (index, _) {
sideMenu.changePage(index);
},
icon: const Icon(Icons.home),
),
SideMenuItem(
title: 'Expansion Item 2',
onTap: (index, _) {
sideMenu.changePage(index);
},
icon: const Icon(Icons.supervisor_account),
)
],
),
SideMenuItem(
title: 'Exit',
Expand Down Expand Up @@ -141,7 +154,12 @@ Widget build(BuildContext context) {
),
Container(
child: Center(
child: Text('Settings'),
child: Text('Expansion Item 1'),
),
),
Container(
child: Center(
child: Text('Expansion Item 2'),
),
),
],
Expand Down Expand Up @@ -257,6 +275,10 @@ style: SideMenuStyle(



#### Thanks
Special thanks to [aditya113141](https://github.com/aditya113141) for contributing and implementing `SideMenuExpansionItem`


---

Feel free to fork this repository and send pull request 🏁👍
32 changes: 10 additions & 22 deletions example/lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ class MyApp extends StatelessWidget {
title: 'easy_sidemenu Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
useMaterial3: false
),
home: const MyHomePage(title: 'easy_sidemenu Demo'),
debugShowCheckedModeBanner: false,
Expand Down Expand Up @@ -66,7 +67,7 @@ class _MyHomePageState extends State<MyHomePage> {
// decoration: BoxDecoration(
// borderRadius: BorderRadius.all(Radius.circular(10)),
// ),
// backgroundColor: Colors.blueGrey[700]
// backgroundColor: Colors.grey[200]
),
title: Column(
children: [
Expand All @@ -89,7 +90,7 @@ class _MyHomePageState extends State<MyHomePage> {
padding: const EdgeInsets.all(8.0),
child: Container(
decoration: BoxDecoration(
color: Colors.lightBlue[100],
color: Colors.lightBlue[50],
borderRadius: BorderRadius.circular(12)),
child: Padding(
padding:
Expand Down Expand Up @@ -135,7 +136,7 @@ class _MyHomePageState extends State<MyHomePage> {
'3',
style: TextStyle(color: Colors.white),
),
tooltipContent:"Expansion Item 1",
tooltipContent: "Expansion Item 1",
),
SideMenuItem(
title: 'Expansion Item 2',
Expand All @@ -144,7 +145,7 @@ class _MyHomePageState extends State<MyHomePage> {
},
icon: const Icon(Icons.supervisor_account),
)
]
],
),
SideMenuItem(
title: 'Files',
Expand Down Expand Up @@ -205,6 +206,7 @@ class _MyHomePageState extends State<MyHomePage> {
),
],
),
const VerticalDivider(width: 0,),
Expanded(
child: PageView(
controller: pageController,
Expand Down Expand Up @@ -263,6 +265,10 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
),

// this is for SideMenuItem with builder (divider)
const SizedBox.shrink(),

Container(
color: Colors.white,
child: const Center(
Expand All @@ -272,24 +278,6 @@ class _MyHomePageState extends State<MyHomePage> {
),
),
),
Container(
color: Colors.white,
child: const Center(
child: Text(
'Only Title',
style: TextStyle(fontSize: 35),
),
),
),
Container(
color: Colors.white,
child: const Center(
child: Text(
'Only Icon',
style: TextStyle(fontSize: 35),
),
),
),
],
),
),
Expand Down
2 changes: 1 addition & 1 deletion example/macos/Runner.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
isa = PBXProject;
attributes = {
LastSwiftUpdateCheck = 0920;
LastUpgradeCheck = 1300;
LastUpgradeCheck = 1430;
ORGANIZATIONNAME = "";
TargetAttributes = {
33CC10EC2044A3C60003C045 = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1300"
LastUpgradeVersion = "1430"
version = "1.3">
<BuildAction
parallelizeBuildables = "YES"
Expand Down
52 changes: 26 additions & 26 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.18.0"
cupertino_icons:
dependency: "direct main"
description:
Expand All @@ -63,7 +63,7 @@ packages:
path: ".."
relative: true
source: path
version: "0.5.0"
version: "0.6.0"
fake_async:
dependency: transitive
description:
Expand All @@ -90,14 +90,6 @@ packages:
description: flutter
source: sdk
version: "0.0.0"
js:
dependency: transitive
description:
name: js
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.6.7"
lints:
dependency: transitive
description:
Expand All @@ -110,26 +102,26 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
meta:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
path:
dependency: transitive
description:
Expand All @@ -147,26 +139,26 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand All @@ -187,10 +179,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.6.1"
vector_math:
dependency: transitive
description:
Expand All @@ -199,6 +191,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.1.4"
web:
dependency: transitive
description:
name: web
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.3.0"
sdks:
dart: ">=3.0.0-0 <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=1.17.0"
Binary file modified images/Screenshot_1.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/Screenshot_2.jpeg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified images/easy_sidemenu.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 5f9a0f2

Please sign in to comment.