Skip to content

Commit

Permalink
Updated Widgets
Browse files Browse the repository at this point in the history
  • Loading branch information
ayvazj committed Apr 12, 2021
1 parent 8210f47 commit ca4354a
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 16 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,3 +1,7 @@
## 1.0.1

* Updated references to deprecated Widgets

## 1.0.0

* Update to Dart 2.12
Expand Down
6 changes: 3 additions & 3 deletions example/lib/main.dart
Expand Up @@ -49,11 +49,11 @@ class _MyAppState extends State<MyApp> {
await _loginWithAmazon.signIn();
} catch (error) {
if (error is PlatformException) {
Scaffold.of(context).showSnackBar(SnackBar(
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text("${error.message}"),
));
} else {
Scaffold.of(context).showSnackBar(SnackBar(
ScaffoldMessenger.of(context).showSnackBar(SnackBar(
content: Text(error.toString()),
));
}
Expand Down Expand Up @@ -102,7 +102,7 @@ class _MyAppState extends State<MyApp> {
padding: EdgeInsets.fromLTRB(0, 0, 10, 0),
child: Align(
alignment: Alignment.topRight,
child: FlatButton(
child: TextButton(
child: Text('Logout'),
onPressed: _handleSignOut,
)),
Expand Down
18 changes: 6 additions & 12 deletions lib/widgets.dart
Expand Up @@ -38,18 +38,12 @@ class _LwaButtonState extends State<LwaButton> {
},
child: Container(
width: 200,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage(_btnImage, package: package_name),
),
),
child: new FlatButton(
padding: EdgeInsets.all(0.0),
splashColor: Colors.transparent,
highlightColor: Colors.transparent,
onPressed: this.widget.onPressed,
child: Text("")),
),
child: IconButton(
icon: Image(image: AssetImage(_btnImage, package: package_name)),
iconSize: 50,
onPressed: this.widget.onPressed,
)
)
);
}
}
2 changes: 1 addition & 1 deletion pubspec.yaml
@@ -1,6 +1,6 @@
name: flutter_lwa
description: Login with Amazon Flutter plugin. Call Amazon APIs from your Flutter application.
version: 1.0.0
version: 1.0.1
homepage: https://github.com/ayvazj/flutter_lwa

environment:
Expand Down

0 comments on commit ca4354a

Please sign in to comment.