brand_circle_loading 0.0.1+1 brand_circle_loading: ^0.0.1+1 copied to clipboard
A simple circle loading with brand logo inside
import 'package:brand_circle_loading/brand_circle_loading.dart';
import 'package:example/loader_widget.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() {
runApp(MaterialApp(
title: 'Flutter Demo',
theme: ThemeData(
primarySwatch: Colors.blue,
visualDensity: VisualDensity.adaptivePlatformDensity,
),
home: App(),
));
}
class App extends StatelessWidget {
@override
Widget build(BuildContext context) {
BrandCircleLoading.init(context, 'images/logo_kalsel.png');
return Scaffold(
body: Padding(
padding: const EdgeInsets.all(8.0),
child: Column(
mainAxisAlignment: MainAxisAlignment.center,
crossAxisAlignment: CrossAxisAlignment.stretch,
children: [
ElevatedButton(
onPressed: () {
BrandCircleLoading().showLoaderOverlay();
},
child: Text('Show Loading Overlay'),
),
SizedBox(height: 20),
ElevatedButton(
onPressed: () {
Navigator.push(
context, MaterialPageRoute(builder: (_) => LoaderWidget()));
},
child: Text('Show Loading Widget'),
),
],
),
),
);
}
}