1234567891011121314151617181920212223242526272829303132 |
- import 'package:flutter/material.dart';
- import 'package:flutter_spinkit/flutter_spinkit.dart';
- class LoadingWidget extends StatelessWidget {
- const LoadingWidget({Key? key, required this.msg}) : super(key: key);
- ///loading msg
- final String msg;
- @override
- Widget build(BuildContext context) {
- return Container(
- padding: const EdgeInsets.symmetric(horizontal: 30, vertical: 20),
- decoration: BoxDecoration(
- color: Colors.black,
- borderRadius: BorderRadius.circular(15),
- ),
- child: Column(mainAxisSize: MainAxisSize.min, children: [
- //loading animation
- const SpinKitCircle(
- color: Colors.white,
- ),
- //msg
- Container(
- margin: const EdgeInsets.only(top: 20),
- child: Text(msg, style: const TextStyle(color: Colors.white)),
- ),
- ]),
- );
- }
- }
|