Initial commit: Penyerahan final Source code Tugas Akhir

This commit is contained in:
ferdiakhh
2025-07-10 19:15:14 +07:00
commit e1f2206b8a
687 changed files with 80132 additions and 0 deletions

View File

@ -0,0 +1,52 @@
import 'package:flutter/material.dart';
import 'package:initial_folder/providers/theme_provider.dart';
import 'package:provider/provider.dart';
import '../../theme.dart';
import '../../size_config.dart';
class DefaultButton extends StatelessWidget {
const DefaultButton({
Key? key,
this.text = '',
this.weight = semiBold,
this.press,
this.isCart,
}) : super(key: key);
final String text;
final FontWeight weight;
final VoidCallback? press;
final bool? isCart;
@override
Widget build(BuildContext context) {
final themeProvider = Provider.of<ThemeProvider>(context);
return SizedBox(
width: isCart != null
? getProportionateScreenWidth(120)
: getProportionateScreenWidth(300),
height: isCart != null
? getProportionateScreenWidth(40)
: getProportionateScreenWidth(44),
child: TextButton(
style: TextButton.styleFrom(
foregroundColor: Colors.white,
shape: RoundedRectangleBorder(
borderRadius:
BorderRadius.circular(getProportionateScreenWidth(10))),
backgroundColor: themeProvider.themeData == ThemeClass.darkmode
?primaryColor : primaryColorligtmode),
onPressed: press,
child: Text(
text,
style: thirdTextStyle.copyWith(
fontSize: getProportionateScreenWidth(12),
fontWeight: weight,
color: baruTextutih,
letterSpacing: 0.3),
),
),
);
}
}