added profil and kurir page in pengirim, added pengiriman page at kurir, sort the api, design the ui back
This commit is contained in:
35
lib/widgets/appbar.dart
Normal file
35
lib/widgets/appbar.dart
Normal file
@ -0,0 +1,35 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class AppBarWidget extends StatelessWidget {
|
||||
const AppBarWidget({
|
||||
Key? key,
|
||||
required this.header,
|
||||
required this.autoLeading,
|
||||
this.actions,
|
||||
}) : super(key: key);
|
||||
|
||||
final String header;
|
||||
final bool autoLeading;
|
||||
final List<Widget>? actions;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
centerTitle: true,
|
||||
title: Text(
|
||||
header,
|
||||
style: TextStyle(
|
||||
fontSize: MediaQuery.of(context).size.height * 0.03,
|
||||
fontWeight: FontWeight.bold,
|
||||
),
|
||||
),
|
||||
automaticallyImplyLeading: autoLeading,
|
||||
backgroundColor: const Color.fromARGB(255, 2, 72, 72),
|
||||
// shape: const RoundedRectangleBorder(
|
||||
// borderRadius: BorderRadius.vertical(
|
||||
// bottom: Radius.circular(40),
|
||||
// ),
|
||||
// ),
|
||||
actions: actions,
|
||||
);
|
||||
}
|
||||
}
|
||||
21
lib/widgets/bounce_scroller.dart
Normal file
21
lib/widgets/bounce_scroller.dart
Normal file
@ -0,0 +1,21 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class BounceScrollerWidget extends StatelessWidget {
|
||||
const BounceScrollerWidget({Key? key, required this.children})
|
||||
: super(key: key);
|
||||
|
||||
final List<Widget> children;
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return SizedBox(
|
||||
height: MediaQuery.of(context).size.height * 0.9,
|
||||
width: double.infinity,
|
||||
child: ListView(
|
||||
physics: const BouncingScrollPhysics(
|
||||
parent: AlwaysScrollableScrollPhysics(),
|
||||
),
|
||||
children: children,
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
66
lib/widgets/load_data.dart
Normal file
66
lib/widgets/load_data.dart
Normal file
@ -0,0 +1,66 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
class ErrorLoadDataWidget extends StatelessWidget {
|
||||
const ErrorLoadDataWidget({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.05),
|
||||
child: const Center(
|
||||
child: Text(
|
||||
'Terjadi kesalahan',
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class TiadaDataWIdget extends StatelessWidget {
|
||||
const TiadaDataWIdget({
|
||||
Key? key,
|
||||
this.text = 'Tidak ada data',
|
||||
}) : super(key: key);
|
||||
|
||||
final String text;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.05),
|
||||
child: Center(
|
||||
child: Text(
|
||||
text,
|
||||
style: TextStyle(
|
||||
color: Colors.white,
|
||||
fontSize: 20,
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
class LoadingDataWidget extends StatelessWidget {
|
||||
const LoadingDataWidget({
|
||||
Key? key,
|
||||
}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Padding(
|
||||
padding: EdgeInsets.only(top: MediaQuery.of(context).size.height * 0.05),
|
||||
child: const Center(
|
||||
child: CircularProgressIndicator(
|
||||
valueColor: AlwaysStoppedAnimation<Color>(Colors.white),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user