refactor: Pages folder structure
This commit is contained in:
parent
5fe495db94
commit
1abb7310f3
88 changed files with 188 additions and 250 deletions
44
lib/widgets/layouts/empty_page.dart
Normal file
44
lib/widgets/layouts/empty_page.dart
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class EmptyPage extends StatelessWidget {
|
||||
final bool loading;
|
||||
static const double _width = 200;
|
||||
const EmptyPage({this.loading = false, Key key}) : super(key: key);
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final _width = min(MediaQuery.of(context).size.width, EmptyPage._width);
|
||||
return Scaffold(
|
||||
// Add invisible appbar to make status bar on Android tablets bright.
|
||||
appBar: AppBar(
|
||||
automaticallyImplyLeading: false,
|
||||
elevation: 0,
|
||||
backgroundColor: Theme.of(context).scaffoldBackgroundColor,
|
||||
),
|
||||
extendBodyBehindAppBar: true,
|
||||
body: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.center,
|
||||
children: [
|
||||
Center(
|
||||
child: Hero(
|
||||
tag: 'info-logo',
|
||||
child: Image.asset(
|
||||
'assets/info-logo.png',
|
||||
width: _width,
|
||||
height: _width,
|
||||
),
|
||||
),
|
||||
),
|
||||
if (loading)
|
||||
Center(
|
||||
child: SizedBox(
|
||||
width: _width,
|
||||
child: const LinearProgressIndicator(),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
|
@ -3,7 +3,7 @@ import 'package:flutter/material.dart';
|
|||
import 'package:matrix/matrix.dart';
|
||||
import 'package:vrouter/vrouter.dart';
|
||||
|
||||
import 'package:fluffychat/pages/views/empty_page_view.dart';
|
||||
import 'package:fluffychat/widgets/layouts/empty_page.dart';
|
||||
import 'package:fluffychat/widgets/matrix.dart';
|
||||
|
||||
class LoadingView extends StatelessWidget {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue