
Performs a comprehensive project rename from 'barcode_scanner' to 'e_scan' (or 'eScan' for user-facing labels). This update spans all relevant files, including: - Application IDs and bundle identifiers for Android, iOS, macOS, and Linux. - VS Code launch configurations. - Dart package import paths. - Project names and titles in `pubspec.yaml`, `README.md`, and platform-specific configurations (e.g., CMakeLists, Info.plist, AndroidManifest).
62 lines
1.7 KiB
Dart
62 lines
1.7 KiB
Dart
import 'package:e_scan/themes/app_theme.dart';
|
|
import 'package:flutter/material.dart';
|
|
|
|
class MainAppbarComponent extends StatelessWidget
|
|
implements PreferredSizeWidget {
|
|
const MainAppbarComponent({
|
|
super.key,
|
|
this.title,
|
|
this.subTitle,
|
|
this.scaffoledKey,
|
|
this.leading,
|
|
});
|
|
final GlobalKey<ScaffoldState>? scaffoledKey;
|
|
final String? title;
|
|
final String? subTitle;
|
|
final Widget? leading;
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return AppBar(
|
|
leading:
|
|
leading ??
|
|
IconButton(
|
|
icon: Icon(Icons.menu, color: AppTheme.of(context).white),
|
|
onPressed: () {
|
|
scaffoledKey?.currentState?.openDrawer();
|
|
},
|
|
),
|
|
title: title == null || subTitle == null
|
|
? null
|
|
: Row(
|
|
children: [
|
|
Column(
|
|
mainAxisSize: MainAxisSize.min,
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
children: [
|
|
Text(
|
|
title ?? '',
|
|
style: AppTheme.of(
|
|
context,
|
|
).titleMedium.copyWith(color: AppTheme.of(context).white),
|
|
),
|
|
Text(
|
|
subTitle ?? '',
|
|
style: AppTheme.of(
|
|
context,
|
|
).bodyMedium.copyWith(color: AppTheme.of(context).white),
|
|
),
|
|
],
|
|
),
|
|
],
|
|
),
|
|
toolbarHeight: 60,
|
|
backgroundColor: AppTheme.of(context).primary,
|
|
elevation: 4,
|
|
);
|
|
}
|
|
|
|
@override
|
|
Size get preferredSize => Size.fromHeight(kToolbarHeight);
|
|
}
|