Skip to content

Commit

Permalink
Added some FlarešŸ”„
Browse files Browse the repository at this point in the history
  • Loading branch information
urmilshroff committed Dec 15, 2019
1 parent 88ecd4e commit c964733
Show file tree
Hide file tree
Showing 5 changed files with 50 additions and 65 deletions.
Binary file added assets/flare/card.flr
Binary file not shown.
79 changes: 26 additions & 53 deletions lib/pages/liquid_page.dart
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import 'package:dashboard_reborn/utils/colors.dart';
import 'package:dashboard_reborn/utils/text_styles.dart';
import 'package:dashboard_reborn/utils/ui_helpers.dart';
import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter/material.dart';
import 'package:liquid_swipe/Constants/Helpers.dart';
import 'package:liquid_swipe/liquid_swipe.dart';
Expand All @@ -15,7 +15,7 @@ class _MyLiquidPageState extends State<MyLiquidPage> {
Widget build(BuildContext context) {
final pages = [
Container(
color: MaterialColors.pink,
color: MyColors.white,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
Expand All @@ -25,33 +25,24 @@ class _MyLiquidPageState extends State<MyLiquidPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
width: 300,
height: 300,
child: Container(
width: 200.0,
height: 200.0,
child: Image.asset(
'assets/icon/icon-legacy.png',
fit: BoxFit.cover,
),
width: 350,
height: 350,
child: FlareActor(
'assets/flare/card.flr',
animation: 'animation',
),
),
SizedBox(
height: 20.0,
),
Text(
'<< Swipe in any direction >>',
style: isThemeCurrentlyDark(context)
? SubHeadingStylesMaterial.light
: SubHeadingStylesMaterial.dark,
'<< Swipe >>',
style: SubHeadingStylesMaterial.dark,
),
],
)
],
),
),
Container(
color: MaterialColors.yellow,
color: MyColors.accent,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
Expand All @@ -61,33 +52,24 @@ class _MyLiquidPageState extends State<MyLiquidPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
width: 300,
height: 300,
child: Container(
width: 200.0,
height: 200.0,
child: Image.asset(
'assets/icon/icon-legacy.png',
fit: BoxFit.cover,
),
width: 350,
height: 350,
child: FlareActor(
'assets/flare/card.flr',
animation: 'animation',
),
),
SizedBox(
height: 20.0,
),
Text(
'<< Swipe in any direction >>',
style: isThemeCurrentlyDark(context)
? SubHeadingStylesMaterial.light
: SubHeadingStylesMaterial.dark,
'<< Swipe >>',
style: SubHeadingStylesMaterial.dark,
),
],
)
],
),
),
Container(
color: MaterialColors.green,
color: MyColors.black,
child: Row(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.center,
Expand All @@ -97,25 +79,16 @@ class _MyLiquidPageState extends State<MyLiquidPage> {
crossAxisAlignment: CrossAxisAlignment.center,
children: <Widget>[
Container(
width: 300,
height: 300,
child: Container(
width: 200.0,
height: 200.0,
child: Image.asset(
'assets/icon/icon-legacy.png',
fit: BoxFit.cover,
),
width: 350,
height: 350,
child: FlareActor(
'assets/flare/card.flr',
animation: 'animation',
),
),
SizedBox(
height: 20.0,
),
Text(
'<< Swipe in any direction >>',
style: isThemeCurrentlyDark(context)
? SubHeadingStylesMaterial.light
: SubHeadingStylesMaterial.dark,
'<< Swipe >>',
style: SubHeadingStylesMaterial.light,
),
],
)
Expand All @@ -126,7 +99,7 @@ class _MyLiquidPageState extends State<MyLiquidPage> {

return LiquidSwipe(
pages: pages,
initialPage: 1,
initialPage: 0,
fullTransitionValue: 350.0,
enableLoop: true,
waveType: WaveType.liquidReveal,
Expand Down
20 changes: 8 additions & 12 deletions lib/pages/material_page.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import 'package:dashboard_reborn/utils/text_styles.dart';
import 'package:dashboard_reborn/utils/ui_helpers.dart';
import 'package:dashboard_reborn/widgets/sexy_bottom_sheet.dart';
import 'package:eva_icons_flutter/eva_icons_flutter.dart';
import 'package:flare_flutter/flare_actor.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
Expand Down Expand Up @@ -134,15 +135,11 @@ class _MyMaterialPageState extends State<MyMaterialPage> {
child: Hero(
tag: 'elt1',
child: Container(
width: 300,
height: 300,
child: Container(
width: 200.0,
height: 200.0,
child: Image.asset(
'assets/icon/icon-legacy.png',
fit: BoxFit.cover,
),
width: 350,
height: 350,
child: FlareActor(
'assets/flare/card.flr',
animation: 'animation',
),
),
),
Expand All @@ -152,8 +149,7 @@ class _MyMaterialPageState extends State<MyMaterialPage> {
right: 15.0,
child: FloatingActionButton(
heroTag: 'elt2',
foregroundColor:
invertInvertColorsMild(context),
foregroundColor: MyColors.light,
backgroundColor: MyColors.accent,
elevation: 5.0,
child: Icon(EvaIcons.close),
Expand Down Expand Up @@ -205,7 +201,7 @@ class _MyMaterialPageState extends State<MyMaterialPage> {
width: 40.0,
child: FloatingActionButton(
heroTag: 'elt2',
foregroundColor: invertInvertColorsMild(context),
foregroundColor: MyColors.light,
backgroundColor: MyColors.accent,
elevation: 3.0,
child: Icon(EvaIcons.infoOutline),
Expand Down
14 changes: 14 additions & 0 deletions pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,20 @@ packages:
url: "https://pub.dartlang.org"
source: hosted
version: "2.0.0"
flare_dart:
dependency: transitive
description:
name: flare_dart
url: "https://pub.dartlang.org"
source: hosted
version: "2.3.0"
flare_flutter:
dependency: "direct main"
description:
name: flare_flutter
url: "https://pub.dartlang.org"
source: hosted
version: "1.8.1"
flutter:
dependency: "direct main"
description: flutter
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ dependencies:
cupertino_icons: ^0.1.2
dynamic_theme: ^1.0.1
eva_icons_flutter: ^2.0.0
flare_flutter: ^1.8.1
gradient_widgets: ^0.5.0
liquid_swipe: '1.2.0'
url_launcher: ^5.2.4
Expand All @@ -35,6 +36,7 @@ flutter:

assets:
- assets/credits/
- assets/flare/
- assets/icon/
- assets/music/

Expand Down

0 comments on commit c964733

Please sign in to comment.