Skip to content

Commit

Permalink
added bloom app
Browse files Browse the repository at this point in the history
  • Loading branch information
pacifio committed Apr 10, 2020
1 parent 1bd41a8 commit eb339ee
Show file tree
Hide file tree
Showing 18 changed files with 357 additions and 1 deletion.
Binary file modified .DS_Store
Binary file not shown.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Flutter UI apps
A collection of beautiful apps created using flutter , inpired by dribble or youtube UI projects . I will update this repository every single day / every 2 days , so star this repo in order to get updates !
A collection of beautiful apps created using flutter , inpired by dribble or youtube UI projects .

> Please note that I am not commiting android and xcode builds . I have made no changes in those folders
Expand All @@ -16,9 +16,11 @@ All of the apps are listed as below
| Dribble UI | [git](https://bit.ly/2P2eFeF) | [dribble](https://bit.ly/2Lwnuvl) | <img src="./media/dribbble.gif" height="200" /> |
| Magazine UI | [git](https://bit.ly/35eDutB) | [dribble](https://bit.ly/35eabaH) | <img src="./media/magazine.gif" height="200" /> |
| IOS Unlock | [git](https://bit.ly/39rPQQt) | Custom | <img src="./media/ios_unlock.gif" height="200" /> |
| Bloom app | [git](https://bit.ly/2UVtnqQ) | [Youtube](https://bit.ly/2y01V2i) | <img src="./media/bloom.gif" height="200" /> |
| Movie Rating App | [git](https://github.com/imSanjaySoni/Movie-Rating-app-with-flutter-Bloc-patten) | Custom | <img src="https://raw.githubusercontent.com/imSanjaySoni/Movie-Rating-app-with-flutter-Bloc-patten/master/screenshots/1.png" height="200" /> |
| BMI Calculator App| [git](https://github.com/imSanjaySoni/BMI-Calculator-with-flutter) | Custom | <img src="https://raw.githubusercontent.com/imSanjaySoni/BMI-Calculator-with-flutter/master/one.png" height="200" /> |


You can however download and use this projects . But in order to show support please consider <bold>starring</bold> this project .

Also check out Sani's profile on [github](https://github.com/imSanjaySoni)
Expand Down
37 changes: 37 additions & 0 deletions bloom/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# Miscellaneous
*.class
*.log
*.pyc
*.swp
.DS_Store
.atom/
.buildlog/
.history
.svn/

# IntelliJ related
*.iml
*.ipr
*.iws
.idea/

# The .vscode folder contains launch configuration and tasks you configure in
# VS Code which you may wish to be included in version control, so this line
# is commented out by default.
#.vscode/

# Flutter/Dart/Pub related
**/doc/api/
.dart_tool/
.flutter-plugins
.flutter-plugins-dependencies
.packages
.pub-cache/
.pub/
/build/

# Web related
lib/generated_plugin_registrant.dart

# Exceptions to above rules.
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
10 changes: 10 additions & 0 deletions bloom/.metadata
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# This file tracks properties of this Flutter project.
# Used by Flutter tool to assess capabilities and perform upgrades etc.
#
# This file should be version controlled and should not be manually edited.

version:
revision: 0b8abb4724aa590dd0f429683339b1e045a1594d
channel: stable

project_type: app
5 changes: 5 additions & 0 deletions bloom/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# bloom

A beautiful app with parallax animation

Design by [Punit Chawla on youtube](https://bit.ly/2y01V2i)
Binary file added bloom/fonts/WorkSans-ExtraBold.ttf
Binary file not shown.
Binary file added bloom/fonts/WorkSans-Light.ttf
Binary file not shown.
Binary file added bloom/fonts/WorkSans-Medium.ttf
Binary file not shown.
Binary file added bloom/fonts/WorkSans-Regular.ttf
Binary file not shown.
Binary file added bloom/images/arrow.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bloom/images/background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bloom/images/bloom.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bloom/images/menu.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added bloom/images/xd.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
201 changes: 201 additions & 0 deletions bloom/lib/main.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,201 @@
import 'dart:math' as math;

import 'package:flutter/material.dart';
import 'package:flutter/rendering.dart';
import 'package:flutter_gifimage/flutter_gifimage.dart';

void main() => runApp(MyApp());

class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Bloom',
theme: ThemeData(
primarySwatch: Colors.blue,
),
home: Home(),
debugShowCheckedModeBanner: false,
);
}
}

class Home extends StatefulWidget {
Home({Key key}) : super(key: key);

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

enum Direction { up, down }

class _HomeState extends State<Home> with SingleTickerProviderStateMixin {
ScrollController _scrollController;
Direction _direction;
GifController _gifController;
double _frame = 0.0;

@override
void initState() {
super.initState();

_gifController = GifController(vsync: this);
_gifController.value = _frame;

_scrollController = ScrollController();
_direction = Direction.down;

_scrollController.addListener(_handleScrollEvent);
}

void _handleScrollEvent() {
if (_direction == Direction.down) {
setState(() {
_frame -= 0.5;
_gifController.value = math.min(math.max(_frame, 0.0), 59.0);
});
} else if (_direction == Direction.up) {
setState(() {
_frame += 0.5;
_gifController.value = math.min(math.max(_frame, 0.0), 59.0);
});
}
}

@override
void dispose() {
_scrollController.removeListener(_handleScrollEvent);
_scrollController.dispose();
super.dispose();
}

bool _handleNotification(Notification notification) {
if (notification is ScrollNotification) {
if (notification is UserScrollNotification &&
notification.direction == ScrollDirection.forward) {
setState(() {
_direction = Direction.down;
});
} else if (notification is UserScrollNotification &&
notification.direction == ScrollDirection.reverse) {
setState(() {
_direction = Direction.up;
});
}
}

return true;
}

Widget _upperSection() {
final TextStyle textStyle =
TextStyle(fontFamily: 'worksans', color: Colors.white);

return Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height,
decoration: BoxDecoration(
image: DecorationImage(
image: AssetImage('images/background.png'), fit: BoxFit.cover)),
child: Scaffold(
backgroundColor: Colors.transparent,
appBar: AppBar(
elevation: 0.0,
backgroundColor: Colors.transparent,
leading: Image.asset('images/xd.png'),
actions: <Widget>[Image.asset('images/menu.png')],
),
body: Column(
children: <Widget>[
SizedBox(
height: 60.0,
),
Text(
"Let your ideas",
style: textStyle.copyWith(
fontSize: 23,
fontWeight: FontWeight.w600,
),
),
Text(
"Bloom",
style: textStyle.copyWith(
fontSize: 100, fontWeight: FontWeight.w700),
),
SizedBox(
height: 30.0,
),
Padding(
padding: const EdgeInsets.symmetric(horizontal: 30.0),
child: Text(
"Share your amazing Adobe Xd Projects for the world to see",
style: textStyle.copyWith(
fontSize: 18,
fontWeight: FontWeight.w400,
),
textAlign: TextAlign.center,
),
),
SizedBox(
height: 37,
),
Image.asset('images/arrow.png'),
Spacer(),
FittedBox(
child: GifImage(
controller: _gifController,
image: AssetImage('images/bloom.gif'),
height: 300.0,
width: 400.0,
),
)
],
),
),
);
}

Widget _lowerPart() {
return Material(
child: Container(
width: MediaQuery.of(context).size.width,
height: MediaQuery.of(context).size.height / 2,
color: Colors.pink.shade50,
child: Align(
alignment: Alignment.bottomCenter,
child: Container(
margin: EdgeInsets.only(bottom: 20.0),
child: FloatingActionButton(
backgroundColor: Colors.pink.shade100,
splashColor: Colors.green,
child: Icon(
Icons.refresh,
color: Colors.black,
),
onPressed: () {
_scrollController.animateTo(0.0,
duration: Duration(milliseconds: 800),
curve: Curves.fastLinearToSlowEaseIn);
_gifController.animateTo(0.0, duration: Duration(seconds: 1));
setState(() {
_frame = 0.0;
});
},
),
),
),
),
);
}

@override
Widget build(BuildContext context) {
return NotificationListener(
onNotification: _handleNotification,
child: ListView(
controller: _scrollController,
children: <Widget>[_upperSection(), _lowerPart()],
),
);
}
}
71 changes: 71 additions & 0 deletions bloom/pubspec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: bloom
description: A new Flutter project.

# The following defines the version and build number for your application.
# A version number is three numbers separated by dots, like 1.2.43
# followed by an optional build number separated by a +.
# Both the version and the builder number may be overridden in flutter
# build by specifying --build-name and --build-number, respectively.
# In Android, build-name is used as versionName while build-number used as versionCode.
# Read more about Android versioning at https://developer.android.com/studio/publish/versioning
# In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
# Read more about iOS versioning at
# https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
version: 1.0.0+1

environment:
sdk: ">=2.1.0 <3.0.0"

dependencies:
flutter:
sdk: flutter

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
flutter_gifimage: ^1.0.0

dev_dependencies:
flutter_test:
sdk: flutter


# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

# The following section is specific to Flutter.
flutter:

# The following line ensures that the Material Icons font is
# included with your application, so that you can use the icons in
# the material Icons class.
uses-material-design: true

# To add assets to your application, add an assets section, like this:
assets:
- images/

# An image asset can refer to one or more resolution-specific "variants", see
# https://flutter.dev/assets-and-images/#resolution-aware.

# For details regarding adding assets from package dependencies, see
# https://flutter.dev/assets-and-images/#from-packages

# To add custom fonts to your application, add a fonts section here,
# in this "flutter" section. Each entry in this list should have a
# "family" key with the font family name, and a "fonts" key with a
# list giving the asset and other descriptors for the font. For
# example:
fonts:
- family: worksans
fonts:
- asset: fonts/WorkSans-Regular.ttf
- asset: fonts/WorkSans-Medium.ttf
weight: 600
- asset: fonts/WorkSans-Light.ttf
weight: 400
- asset: fonts/WorkSans-ExtraBold.ttf
weight: 700
#
# For details regarding fonts from package dependencies,
# see https://flutter.dev/custom-fonts/#from-packages
30 changes: 30 additions & 0 deletions bloom/test/widget_test.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
// This is a basic Flutter widget test.
//
// To perform an interaction with a widget in your test, use the WidgetTester
// utility that Flutter provides. For example, you can send tap and scroll
// gestures. You can also use WidgetTester to find child widgets in the widget
// tree, read text, and verify that the values of widget properties are correct.

import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';

import 'package:bloom/main.dart';

void main() {
testWidgets('Counter increments smoke test', (WidgetTester tester) async {
// Build our app and trigger a frame.
await tester.pumpWidget(MyApp());

// Verify that our counter starts at 0.
expect(find.text('0'), findsOneWidget);
expect(find.text('1'), findsNothing);

// Tap the '+' icon and trigger a frame.
await tester.tap(find.byIcon(Icons.add));
await tester.pump();

// Verify that our counter has incremented.
expect(find.text('0'), findsNothing);
expect(find.text('1'), findsOneWidget);
});
}
Binary file added media/bloom.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit eb339ee

Please sign in to comment.