elCaribe app - customization and branding

This commit is contained in:
2025-12-12 19:09:42 -04:00
parent 9e5d0d8ebf
commit ba7deac9f3
402 changed files with 31833 additions and 0 deletions

View File

@@ -0,0 +1,45 @@
import 'dart:core';
import 'package:flutter/material.dart';
import 'package:news/ui/widgets/customBackBtn.dart';
import 'package:news/ui/widgets/customTextLabel.dart';
import 'package:news/utils/uiUtils.dart';
class CustomAppBar extends StatelessWidget implements PreferredSizeWidget {
final double height;
final double? horizontalPad;
final bool isBackBtn, isConvertText;
final String label;
final List<Widget>? actionWidget;
const CustomAppBar({Key? key, required this.height, required this.isBackBtn, required this.label, required this.isConvertText, this.horizontalPad, this.actionWidget}) : super(key: key);
@override
Widget build(BuildContext context) {
return PreferredSize(
preferredSize: Size(double.infinity, height),
child: UiUtils.applyBoxShadow(
context: context,
child: AppBar(
leading: (isBackBtn) ? CustomBackButton(horizontalPadding: horizontalPad ?? 15) : null,
actions: actionWidget,
titleSpacing: 0.0,
automaticallyImplyLeading: false,
centerTitle: false,
elevation: 0,
backgroundColor: Colors.transparent,
title: Padding(
padding: EdgeInsetsDirectional.only(start: isBackBtn ? 0 : 20),
child: !isConvertText
? Text(label, style: Theme.of(context).textTheme.titleLarge?.copyWith(color: UiUtils.getColorScheme(context).primaryContainer, fontWeight: FontWeight.w600, letterSpacing: 0.5))
: CustomTextLabel(
text: label,
textStyle: Theme.of(context).textTheme.titleLarge?.copyWith(color: UiUtils.getColorScheme(context).primaryContainer, fontWeight: FontWeight.w600, letterSpacing: 0.5),
),
),
),
));
}
@override
Size get preferredSize => const Size.fromHeight(kToolbarHeight);
}