Skip to content

Commit

Permalink
Improve UI animations
Browse files Browse the repository at this point in the history
  • Loading branch information
Luis Ciber committed Oct 25, 2021
1 parent 39b3220 commit 0f183f8
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 13 deletions.
14 changes: 9 additions & 5 deletions lib/app/widgets/app_drawer.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:animate_do/animate_do.dart';
import 'package:flutter/material.dart';
import 'package:todo/app/app.dart';
// import 'package:todo/nauta/nauta.dart';
Expand All @@ -17,17 +18,20 @@ class AppDrawer extends StatelessWidget {
child: Stack(
children: [
ListView(
physics: const BouncingScrollPhysics(),
children: [
DrawerHeader(
child: Center(
child: Column(
mainAxisSize: MainAxisSize.min,
children: [
Container(
margin: const EdgeInsets.all(10),
child: Assets.images.logo.image(
width: 75,
height: 75,
ZoomIn(
child: Container(
margin: const EdgeInsets.all(10),
child: Assets.images.logo.image(
width: 75,
height: 75,
),
),
),
Text(
Expand Down
4 changes: 3 additions & 1 deletion lib/nauta/view/accounts_view.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:animate_do/animate_do.dart';
import 'package:flutter/material.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:todo/app/app.dart';
Expand Down Expand Up @@ -32,9 +33,10 @@ class AccountsView extends StatelessWidget {
return Padding(
padding: const EdgeInsets.all(8),
child: ListView(
physics: const BouncingScrollPhysics(),
children: [
...state.accounts.map(
(e) => AccountTile(account: e),
(e) => FadeInUp(child: AccountTile(account: e)),
),
],
),
Expand Down
2 changes: 1 addition & 1 deletion lib/nauta/view/save_account_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class SaveAccountView extends StatelessWidget {
AccountsPage.open(context);
},
child: SingleChildScrollView(
physics: const ClampingScrollPhysics(),
physics: const BouncingScrollPhysics(),
child: AutofillGroup(
child: Padding(
padding: const EdgeInsets.all(8),
Expand Down
1 change: 1 addition & 0 deletions lib/settings/view/disclaimer_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ class DisclaimerView extends StatelessWidget {
title: AppBarTitle(l10n.termOfUse),
),
body: ListView(
physics: const BouncingScrollPhysics(),
children: [
const SizedBox(
height: 20,
Expand Down
1 change: 1 addition & 0 deletions lib/settings/view/settings_view.dart
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ class SettingsView extends StatelessWidget {
return Padding(
padding: const EdgeInsets.all(30),
child: ListView(
physics: const BouncingScrollPhysics(),
children: [
const SizedBox(height: 30),
SettingsSwitch(
Expand Down
11 changes: 8 additions & 3 deletions lib/ussd_codes/view/ussd_category_view.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:animate_do/animate_do.dart';
import 'package:flutter/material.dart';
import 'package:todo/app/app.dart';
import 'package:todo/ussd_codes/ussd_codes.dart';
Expand All @@ -19,6 +20,7 @@ class UssdCategoryView extends StatelessWidget {
title: AppBarTitle(category.name),
),
body: ListView(
physics: const BouncingScrollPhysics(),
children: [
const SizedBox(
height: 15,
Expand All @@ -37,9 +39,12 @@ class UssdCategoryView extends StatelessWidget {
height: 15,
),
...category.items.map(
(e) => UssdItemWidget(
ussdItem: e,
recent: recent,
(e) => FadeInLeft(
duration: const Duration(milliseconds: 400),
child: UssdItemWidget(
ussdItem: e,
recent: recent,
),
),
),
const SizedBox(
Expand Down
11 changes: 8 additions & 3 deletions lib/ussd_codes/view/ussd_code_view.dart
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import 'package:animate_do/animate_do.dart';
import 'package:flutter/material.dart';
import 'package:font_awesome_flutter/font_awesome_flutter.dart';
import 'package:todo/app/app.dart';
Expand Down Expand Up @@ -25,11 +26,15 @@ class UssdCodeView extends StatelessWidget {
}

return ListView(
physics: const BouncingScrollPhysics(),
children: [
...items.map(
(e) => UssdItemWidget(
ussdItem: e,
recent: recent,
(e) => FadeInLeft(
duration: const Duration(milliseconds: 400),
child: UssdItemWidget(
ussdItem: e,
recent: recent,
),
),
)
],
Expand Down
1 change: 1 addition & 0 deletions lib/ussd_codes/widgets/ussd_code_form.dart
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ class _UssdCodeFormState extends State<UssdCodeForm> {
return Form(
key: _formKey,
child: ListView(
physics: const BouncingScrollPhysics(),
children: [
widget.icon,
const SizedBox(height: 30),
Expand Down
7 changes: 7 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "1.7.2"
animate_do:
dependency: "direct main"
description:
name: animate_do
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
archive:
dependency: transitive
description:
Expand Down
1 change: 1 addition & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ environment:
sdk: ">=2.12.0 <3.0.0"

dependencies:
animate_do: ^2.0.0
beamer: ^0.14.1
bloc: ^7.2.0
connectivity_plus: ^2.0.2
Expand Down

0 comments on commit 0f183f8

Please sign in to comment.