Skip to content

Commit

Permalink
Merge pull request #220 from Sandipkakadiya/review
Browse files Browse the repository at this point in the history
Release
  • Loading branch information
Sandipkakadiya authored Mar 17, 2021
2 parents 9bceb78 + e8dffba commit 11235ef
Show file tree
Hide file tree
Showing 87 changed files with 10,375 additions and 1,406 deletions.
11 changes: 11 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
# Changelog


## 2.0.1-nullsafety.4 - 2021-03-17

### Added
* Added test cases.

## 2.0.0-nullsafety.3 - 2021-03-09

### Added
* Added nullsafety.


## 1.2.4 - 2020-11-12

### Fixed
Expand Down
86 changes: 43 additions & 43 deletions example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -7,42 +7,42 @@ packages:
name: async
url: "https://pub.dartlang.org"
source: hosted
version: "2.5.0-nullsafety.1"
version: "2.5.0"
boolean_selector:
dependency: transitive
description:
name: boolean_selector
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
characters:
dependency: transitive
description:
name: characters
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.3"
version: "1.1.0"
charcode:
dependency: transitive
description:
name: charcode
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
clock:
dependency: transitive
description:
name: clock
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
collection:
dependency: transitive
description:
name: collection
url: "https://pub.dartlang.org"
source: hosted
version: "1.15.0-nullsafety.3"
version: "1.15.0"
convert:
dependency: transitive
description:
Expand All @@ -63,7 +63,7 @@ packages:
name: fake_async
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
flutter:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -92,28 +92,35 @@ packages:
path: ".."
relative: true
source: path
version: "1.2.4"
version: "2.0.1-nullsafety.4"
js:
dependency: transitive
description:
name: js
url: "https://pub.dartlang.org"
source: hosted
version: "0.6.3"
matcher:
dependency: transitive
description:
name: matcher
url: "https://pub.dartlang.org"
source: hosted
version: "0.12.10-nullsafety.1"
version: "0.12.10"
meta:
dependency: transitive
description:
name: meta
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
path:
dependency: transitive
description:
name: path
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.1"
version: "1.8.0"
path_drawing:
dependency: transitive
description:
Expand All @@ -134,28 +141,14 @@ packages:
name: petitparser
url: "https://pub.dartlang.org"
source: hosted
version: "3.0.4"
platform_detect:
dependency: transitive
description:
name: platform_detect
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.0"
version: "3.1.0"
plugin_platform_interface:
dependency: transitive
description:
name: plugin_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.1"
pub_semver:
dependency: transitive
description:
name: pub_semver
url: "https://pub.dartlang.org"
source: hosted
version: "1.4.4"
version: "1.0.3"
sky_engine:
dependency: transitive
description: flutter
Expand All @@ -167,98 +160,105 @@ packages:
name: source_span
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.0-nullsafety.2"
version: "1.8.0"
stack_trace:
dependency: transitive
description:
name: stack_trace
url: "https://pub.dartlang.org"
source: hosted
version: "1.10.0-nullsafety.1"
version: "1.10.0"
stream_channel:
dependency: transitive
description:
name: stream_channel
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.1"
version: "2.1.0"
string_scanner:
dependency: transitive
description:
name: string_scanner
url: "https://pub.dartlang.org"
source: hosted
version: "1.1.0-nullsafety.1"
version: "1.1.0"
term_glyph:
dependency: transitive
description:
name: term_glyph
url: "https://pub.dartlang.org"
source: hosted
version: "1.2.0-nullsafety.1"
version: "1.2.0"
test_api:
dependency: transitive
description:
name: test_api
url: "https://pub.dartlang.org"
source: hosted
version: "0.2.19-nullsafety.2"
version: "0.2.19"
typed_data:
dependency: transitive
description:
name: typed_data
url: "https://pub.dartlang.org"
source: hosted
version: "1.3.0-nullsafety.3"
version: "1.3.0"
url_launcher:
dependency: "direct main"
description:
name: url_launcher
url: "https://pub.dartlang.org"
source: hosted
version: "5.5.3"
version: "5.7.10"
url_launcher_linux:
dependency: transitive
description:
name: url_launcher_linux
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+1"
version: "0.0.1+4"
url_launcher_macos:
dependency: transitive
description:
name: url_launcher_macos
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+7"
version: "0.0.1+9"
url_launcher_platform_interface:
dependency: transitive
description:
name: url_launcher_platform_interface
url: "https://pub.dartlang.org"
source: hosted
version: "1.0.8"
version: "1.0.9"
url_launcher_web:
dependency: transitive
description:
name: url_launcher_web
url: "https://pub.dartlang.org"
source: hosted
version: "0.1.3+2"
version: "0.1.5+3"
url_launcher_windows:
dependency: transitive
description:
name: url_launcher_windows
url: "https://pub.dartlang.org"
source: hosted
version: "0.0.1+3"
vector_math:
dependency: transitive
description:
name: vector_math
url: "https://pub.dartlang.org"
source: hosted
version: "2.1.0-nullsafety.3"
version: "2.1.0"
xml:
dependency: transitive
description:
name: xml
url: "https://pub.dartlang.org"
source: hosted
version: "4.2.0"
version: "4.5.1"
sdks:
dart: ">=2.10.0-110 <2.11.0"
flutter: ">=1.18.0-6.0.pre <2.0.0"
dart: ">=2.12.0 <3.0.0"
flutter: ">=1.22.0"
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@ import 'package:getwidget/getwidget.dart';
class GFAccordion extends StatefulWidget {
/// An accordion is used to show (and hide) content. Use [showAccordion] to hide & show the accordion content.
const GFAccordion(
{Key key,
this.titleChild,
{Key? key,
this.title,
this.content,
this.titleChild,
this.contentChild,
this.collapsedTitleBackgroundColor = GFColors.WHITE,
this.expandedTitleBackgroundColor = const Color(0xFFE0E0E0),
this.collapsedIcon = const Icon(Icons.keyboard_arrow_down),
this.expandedIcon = const Icon(Icons.keyboard_arrow_up),
this.title,
this.textStyle = const TextStyle(color: Colors.black, fontSize: 16),
this.titlePadding = const EdgeInsets.all(10),
this.contentBackgroundColor,
this.contentPadding = const EdgeInsets.all(10),
this.contentChild,
this.titleBorder = const Border(),
this.contentBorder = const Border(),
this.margin,
Expand All @@ -30,13 +30,13 @@ class GFAccordion extends StatefulWidget {
final bool showAccordion;

/// child of type [Widget]is alternative to title key. title will get priority over titleChild
final Widget titleChild;
final Widget? titleChild;

/// content of type[String] which shows the messages after the [GFAccordion] is expanded
final String content;
final String? content;

/// contentChild of type [Widget]is alternative to content key. content will get priority over contentChild
final Widget contentChild;
final Widget? contentChild;

/// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] title when it is collapsed
final Color collapsedTitleBackgroundColor;
Expand All @@ -51,7 +51,7 @@ class GFAccordion extends StatefulWidget {
final Widget expandedIcon;

/// text of type [String] is alternative to child. text will get priority over titleChild
final String title;
final String? title;

/// textStyle of type [textStyle] will be applicable to text only and not for the child
final TextStyle textStyle;
Expand All @@ -63,10 +63,10 @@ class GFAccordion extends StatefulWidget {
final EdgeInsets contentPadding;

/// type of [Color] or [GFColors] which is used to change the background color of the [GFAccordion] description
final Color contentBackgroundColor;
final Color? contentBackgroundColor;

/// margin of type [EdgeInsets] which is used to set the margin of the [GFAccordion]
final EdgeInsets margin;
final EdgeInsets? margin;

/// titleBorderColor of type [Color] or [GFColors] which is used to change the border color of title
final Border titleBorder;
Expand All @@ -81,18 +81,18 @@ class GFAccordion extends StatefulWidget {
final BorderRadius contentBorderRadius;

/// function called when the content body collapsed
final Function(bool) onToggleCollapsed;
final Function(bool)? onToggleCollapsed;

@override
_GFAccordionState createState() => _GFAccordionState();
}

class _GFAccordionState extends State<GFAccordion>
with TickerProviderStateMixin {
AnimationController animationController;
AnimationController controller;
Animation<Offset> offset;
bool showAccordion;
late AnimationController animationController;
late AnimationController controller;
late Animation<Offset> offset;
late bool showAccordion;

@override
void initState() {
Expand Down Expand Up @@ -142,7 +142,7 @@ class _GFAccordionState extends State<GFAccordion>
children: <Widget>[
Expanded(
child: widget.title != null
? Text(widget.title, style: widget.textStyle)
? Text(widget.title!, style: widget.textStyle)
: (widget.titleChild ?? Container()),
),
showAccordion ? widget.expandedIcon : widget.collapsedIcon
Expand All @@ -162,7 +162,7 @@ class _GFAccordionState extends State<GFAccordion>
child: SlideTransition(
position: offset,
child: widget.content != null
? Text(widget.content)
? Text(widget.content!)
: (widget.contentChild ?? Container()),
))
: Container()
Expand All @@ -183,7 +183,7 @@ class _GFAccordionState extends State<GFAccordion>
}
showAccordion = !showAccordion;
if (widget.onToggleCollapsed != null) {
widget.onToggleCollapsed(showAccordion);
widget.onToggleCollapsed!(showAccordion);
}
});
}
Expand Down
Loading

0 comments on commit 11235ef

Please sign in to comment.