Initial commit: Penyerahan final Source code Tugas Akhir
This commit is contained in:
@ -0,0 +1,77 @@
|
||||
import 'package:flutter/cupertino.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter/widgets.dart';
|
||||
import 'package:flutter_feather_icons/flutter_feather_icons.dart';
|
||||
import 'package:initial_folder/providers/certificate_provider.dart';
|
||||
import 'package:initial_folder/screens/certificate/component/just_certificate_count.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import '../../../size_config.dart';
|
||||
import '../../../theme.dart';
|
||||
|
||||
class CertificateHeader extends StatelessWidget {
|
||||
const CertificateHeader({Key? key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer<CertificateProvider>(
|
||||
builder: (context, value, _) {
|
||||
return RefreshIndicator(
|
||||
onRefresh: () async {
|
||||
await Provider.of<CertificateProvider>(context, listen: false)
|
||||
.getAllCertif();
|
||||
},
|
||||
child: const Column(
|
||||
children: [
|
||||
JustCertificateCount(),
|
||||
// Visibility(
|
||||
// visible: value.state != ResultState.Loading,
|
||||
// child: Container(
|
||||
// // decoration: BoxDecoration(
|
||||
// // borderRadius: BorderRadius.circular(10),
|
||||
// // color: Theme.of(context).brightness == Brightness.dark
|
||||
// // ? seventeenColor
|
||||
// // : secondaryColor.withOpacity(0.3),
|
||||
// // ),
|
||||
// height: 40,
|
||||
// // child: TextField(
|
||||
// // autofocus: false,
|
||||
// // onSubmitted: (value) async {
|
||||
// // if (value.trim().isNotEmpty) {
|
||||
// // Provider.of<CertificateProvider>(context, listen: false)
|
||||
// // .searchCertif(value);
|
||||
// // }
|
||||
// // },
|
||||
// // style: primaryTextStyle.copyWith(
|
||||
// // fontSize: getProportionateScreenWidth(14),
|
||||
// // letterSpacing: 0.5,
|
||||
// // ),
|
||||
// // cursorColor: secondaryColor,
|
||||
// // decoration: InputDecoration(
|
||||
// // border: InputBorder.none,
|
||||
// // errorBorder: OutlineInputBorder(
|
||||
// // borderSide: BorderSide(color: sevenColor),
|
||||
// // borderRadius: BorderRadius.circular(10)),
|
||||
// // contentPadding: EdgeInsets.only(
|
||||
// // top: getProportionateScreenHeight(3.5)),
|
||||
// // prefixIcon: Icon(
|
||||
// // FeatherIcons.search,
|
||||
// // size: 20,
|
||||
// // color: Colors.grey,
|
||||
// // ),
|
||||
// // hintText: 'Cari sertifikat kursus',
|
||||
// // hintStyle: primaryTextStyle.copyWith(
|
||||
// // fontSize: getProportionateScreenWidth(12),
|
||||
// // color: secondaryColor,
|
||||
// // letterSpacing: 0.5,
|
||||
// // ),
|
||||
// // ),
|
||||
// // ),
|
||||
// ),
|
||||
// ),
|
||||
],
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user