mirror of
https://github.com/jagandeepbrar/lunasea.git
synced 2026-08-31 20:52:32 +00:00
* chore(packages): Added pedantic package to enforce linting and styling * feat(lunasea): Enforce effective dart styling * Comment and format colours class * Localize additional classes in Dashboard, cleanup additional code * chore(lunasea): Major refactor by running dartfmt on the entire codebase, added widget return for page routers * Additional work on conforming to effective dart style * fix(share_plus): Roll back share_plus package to 2.0.0 to support iOS 12 or lower * chore(lunasea): Fix remaining enabled analysis warnings
35 lines
874 B
Dart
35 lines
874 B
Dart
import 'package:flutter/material.dart';
|
|
import 'package:flutter_spinkit/flutter_spinkit.dart';
|
|
import 'package:lunasea/core.dart';
|
|
|
|
class LunaLoader extends StatelessWidget {
|
|
final double size;
|
|
final Color color;
|
|
final bool useSafeArea;
|
|
|
|
LunaLoader({
|
|
Key key,
|
|
this.size = 25.0,
|
|
this.color,
|
|
this.useSafeArea = true,
|
|
}) : super(key: key);
|
|
|
|
@override
|
|
Widget build(BuildContext context) => SafeArea(
|
|
left: useSafeArea,
|
|
right: useSafeArea,
|
|
top: useSafeArea,
|
|
bottom: useSafeArea,
|
|
child: Column(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
crossAxisAlignment: CrossAxisAlignment.center,
|
|
children: <Widget>[
|
|
SpinKitThreeBounce(
|
|
color: color != null ? color : LunaColours.accent,
|
|
size: size,
|
|
),
|
|
],
|
|
),
|
|
);
|
|
}
|