Skip to content

Commit 41ea13c

Browse files
committed
Update Readme- Cleaning code
1 parent 5a7f1c0 commit 41ea13c

File tree

7 files changed

+39
-35
lines changed

7 files changed

+39
-35
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## [0.2.7] - 2019-06-14.
2+
3+
* Cleaning code.
4+
* Update Readme.
5+
16
## [0.2.6] - 2019-05-13.
27

38
* Fixed InnerDrawerCallback.

README.md

Lines changed: 18 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# flutter_inner_drawer
2-
3-
[![pub package](https://img.shields.io/badge/pub-0.2.6-orange.svg)](https://pub.dartlang.org/packages/flutter_inner_drawer)
2+
[![pub package](https://img.shields.io/badge/pub-0.2.7-orange.svg)](https://pub.dartlang.org/packages/flutter_inner_drawer)
3+
[![Awesome Flutter](https://img.shields.io/badge/Awesome-Flutter-blue.svg?longCache=true&style=flat-square)](https://github.com/Solido/awesome-flutter#drawers)
44
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/dnag88)
55

66

@@ -10,15 +10,19 @@ Inner Drawer is an easy way to create an internal side section (left/right) wher
1010
Add this to your package's pubspec.yaml file:
1111
```dart
1212
dependencies:
13-
flutter_inner_drawer: "^0.2.6"
13+
flutter_inner_drawer: "^0.2.7"
1414
```
15-
16-
### DEMO
17-
![Example](https://github.com/Dn-a/flutter_inner_drawer/tree/master/example)
18-
19-
![Demo 1](https://github.com/Dn-a/flutter_inner_drawer/blob/master/example/example3.gif)
20-
![Pic 1](https://github.com/Dn-a/flutter_inner_drawer/blob/master/example/pic.png)
21-
15+
## Demo
16+
<div align="center">
17+
<table><tr>
18+
<td style="text-align:center">
19+
<img width="250px" src="https://github.com/Dn-a/flutter_inner_drawer/blob/master/example/example3.gif?raw=true" />
20+
</td>
21+
<td style="text-align:center">
22+
<img width="250px" src="https://github.com/Dn-a/flutter_inner_drawer/blob/master/example/pic.png?raw=true"/>
23+
</td>
24+
</tr></table>
25+
</div>
2226

2327

2428
### Simple usage
@@ -92,7 +96,9 @@ import 'package:flutter_inner_drawer/inner_drawer.dart';
9296
* animationType - *static / linear / quadratic (default static)*
9397
* innerDrawerCallback - *Optional callback that is called when a InnerDrawer is opened or closed*
9498

99+
## Donate
100+
If you found this project helpful or you learned something from the source code and want to thank me:
101+
- [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.me/dnag88)
95102

96103
## Issues
97-
If you encounter problems, open an issue. Pull request are also welcome.
98-
104+
If you encounter problems, open an issue. Pull request are also welcome.

example/README.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ An example of how you could implement it.
55
## Getting Started - Inner Drawer
66

77
```
8-
98
import 'package:example/env.dart';
109
import 'package:flutter/cupertino.dart';
1110
import 'package:flutter/material.dart';
@@ -60,9 +59,8 @@ class _MyHomePageState extends State<MyHomePage>
6059
@override
6160
void initState()
6261
{
63-
64-
super.initState();
6562
_getwidthContainer();
63+
super.initState();
6664
}
6765
6866
@@ -93,17 +91,16 @@ class _MyHomePageState extends State<MyHomePage>
9391
@override
9492
Widget build(BuildContext context)
9593
{
96-
_getwidthContainer();
9794
9895
return InnerDrawer(
9996
key: _innerDrawerKey,
10097
position: _position ? InnerDrawerPosition.start : InnerDrawerPosition.end,
98+
animationType: _animationType,
10199
onTapClose: _onTapToClose,
102100
offset: _offset,
103101
swipe: _swipe,
104102
colorTransition: currentColor,
105-
animationType: _animationType,
106-
//innerDrawerCallback: (a) => print(a),
103+
innerDrawerCallback: (a) => print(a),
107104
child: Material(
108105
child: SafeArea(
109106
//top: false,
@@ -217,6 +214,7 @@ class _MyHomePageState extends State<MyHomePage>
217214
automaticallyImplyLeading: false,
218215
backgroundColor: Colors.grey[50],
219216
),
217+
220218
child: SafeArea(
221219
child: Material(
222220
child:Container(
@@ -427,7 +425,7 @@ class _MyHomePageState extends State<MyHomePage>
427425
});
428426
},
429427
onChangeEnd: (a){
430-
_getwidthContainer();
428+
//_getwidthContainer();
431429
},
432430
),
433431
),

example/lib/main.dart

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,9 +52,8 @@ class _MyHomePageState extends State<MyHomePage>
5252
@override
5353
void initState()
5454
{
55-
56-
super.initState();
5755
_getwidthContainer();
56+
super.initState();
5857
}
5958

6059

@@ -85,7 +84,6 @@ class _MyHomePageState extends State<MyHomePage>
8584
@override
8685
Widget build(BuildContext context)
8786
{
88-
_getwidthContainer();
8987

9088
return InnerDrawer(
9189
key: _innerDrawerKey,
@@ -420,7 +418,7 @@ class _MyHomePageState extends State<MyHomePage>
420418
});
421419
},
422420
onChangeEnd: (a){
423-
_getwidthContainer();
421+
//_getwidthContainer();
424422
},
425423
),
426424
),

lib/inner_drawer.dart

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,13 @@ class InnerDrawerState extends State<InnerDrawer> with SingleTickerProviderState
104104
@override
105105
void initState()
106106
{
107-
super.initState();
108-
109107
_updateWidth();
110108

111109
_controller = AnimationController(duration: _kBaseSettleDuration, vsync: this)
112110
..addListener(_animationChanged)
113111
..addStatusListener(_animationStatusChanged);
114-
115112
_controller.value = 1;
113+
super.initState();
116114
}
117115

118116

@@ -132,7 +130,7 @@ class InnerDrawerState extends State<InnerDrawer> with SingleTickerProviderState
132130
});
133131

134132
if(widget.colorTransition!=null)
135-
_color = ColorTween (begin: Colors.transparent, end: widget.colorTransition);
133+
_color = ColorTween (begin: widget.colorTransition.withOpacity(0.0), end: widget.colorTransition);
136134
else
137135
_color = ColorTween(begin: Colors.transparent, end: Colors.black54);
138136
}
@@ -404,7 +402,7 @@ class InnerDrawerState extends State<InnerDrawer> with SingleTickerProviderState
404402
Widget build(BuildContext context)
405403
{
406404
//assert(debugCheckHasMaterialLocalizations(context));
407-
405+
408406
// initialize the correct width
409407
if(_initWidth == 400 || MediaQuery.of(context).orientation != _orientation){
410408
_updateWidth();
@@ -420,7 +418,6 @@ class InnerDrawerState extends State<InnerDrawer> with SingleTickerProviderState
420418

421419
return Stack(
422420
alignment: _drawerInnerAlignment,
423-
overflow: Overflow.visible,
424421
children: <Widget>[
425422
_innerAnimationType(width),
426423
GestureDetector(

pubspec.lock

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
# Generated by pub
2-
# See https://www.dartlang.org/tools/pub/glossary#lockfile
2+
# See https://dart.dev/tools/pub/glossary#lockfile
33
packages:
44
async:
55
dependency: transitive
66
description:
77
name: async
88
url: "https://pub.dartlang.org"
99
source: hosted
10-
version: "2.1.0"
10+
version: "2.2.0"
1111
boolean_selector:
1212
dependency: transitive
1313
description:
@@ -66,14 +66,14 @@ packages:
6666
name: pedantic
6767
url: "https://pub.dartlang.org"
6868
source: hosted
69-
version: "1.5.0"
69+
version: "1.7.0"
7070
quiver:
7171
dependency: transitive
7272
description:
7373
name: quiver
7474
url: "https://pub.dartlang.org"
7575
source: hosted
76-
version: "2.0.2"
76+
version: "2.0.3"
7777
sky_engine:
7878
dependency: transitive
7979
description: flutter
@@ -120,7 +120,7 @@ packages:
120120
name: test_api
121121
url: "https://pub.dartlang.org"
122122
source: hosted
123-
version: "0.2.4"
123+
version: "0.2.5"
124124
typed_data:
125125
dependency: transitive
126126
description:

pubspec.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: flutter_inner_drawer
22
description: Inner Drawer is an easy way to create an internal side section (left/right) where you can insert a list menu or other.
3-
version: 0.2.6
3+
version: 0.2.7
44
author: Antonino Di Natale <[email protected]>
55
homepage: https://github.com/Dn-a/flutter_inner_drawer
66

0 commit comments

Comments
 (0)