https://github.com/pacifio/aurora
Aurora is a flutter package to create aurora gradient shades in your mobile app .
https://github.com/pacifio/aurora
flutter flutter-challenge flutter-packge gradient
Last synced: about 1 month ago
JSON representation
Aurora is a flutter package to create aurora gradient shades in your mobile app .
- Host: GitHub
- URL: https://github.com/pacifio/aurora
- Owner: pacifio
- License: mit
- Created: 2021-04-06T00:48:42.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2021-08-05T02:18:51.000Z (almost 5 years ago)
- Last Synced: 2025-05-18T17:56:37.791Z (about 1 year ago)
- Topics: flutter, flutter-challenge, flutter-packge, gradient
- Language: Dart
- Homepage:
- Size: 539 KB
- Stars: 3
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Aurora
Aurora is a flutter package to create [aurora](https://youtu.be/Y3VJTnmJEgM) gradient shades in your mobile app .

## Install
```yaml
dependencies:
aurora: ^1.0.0
```
## Usage
```dart
import 'package:aurora/aurora.dart';
Aurora(
size: 300,
colors: [Color(0xFFfbd07c), Color(0xFFf7f779)],
blur: 200
)
```
## Full example
```dart
import 'package:aurora/aurora.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
void main() {
runApp(MyApp());
}
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Aurora',
home: HomeScreen(),
debugShowCheckedModeBanner: false,
);
}
}
class HomeScreen extends StatelessWidget {
const HomeScreen({Key key}) : super(key: key);
@override
Widget build(BuildContext context) {
final TextStyle style = TextStyle(
fontSize: 48,
fontWeight: FontWeight.bold,
color: Colors.white.withOpacity(0.7),
letterSpacing: 1.2);
return AnnotatedRegion(
value: SystemUiOverlayStyle.light
.copyWith(statusBarColor: Colors.transparent),
child: Scaffold(
backgroundColor: Colors.black,
body: Stack(
children: [
Positioned(
top: -10,
left: -100,
child: Aurora(
size: 300,
colors: [
Color(0xffc2e59c).withOpacity(1),
Color(0xff64b3f4).withOpacity(1)
],
)),
Positioned(
top: -50,
right: -50,
child: Aurora(
size: 200,
colors: [Color(0xFFfbd07c), Color(0xFFf7f779)],
)),
Positioned(
bottom: -100,
right: -300,
child: Aurora(
size: 600,
colors: [Color(0xFFff0f7b), Color(0xFFf89b29)],
)),
Positioned(
bottom: -50,
left: -100,
child: Aurora(
size: 200,
colors: [Color(0xFF595cff), Color(0xFFc6f8ff)],
)),
Positioned.fill(
child: Center(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: [
Text(
"Aurora",
style: style,
),
Text(
"Gradients",
style: style.copyWith(fontSize: style.fontSize + 8),
),
],
),
)),
],
),
),
);
}
}
```