You've already forked flutter-rp-example
First commit
This commit is contained in:
33
lib/widgets/components/reflex_app_bar.dart
Normal file
33
lib/widgets/components/reflex_app_bar.dart
Normal file
@@ -0,0 +1,33 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import '../../globals.dart';
|
||||
|
||||
class ReflexAppBar extends StatelessWidget implements PreferredSizeWidget {
|
||||
final Function()? onBackCallback;
|
||||
|
||||
const ReflexAppBar({Key? key, required this.actions, this.onBackCallback})
|
||||
: super(key: key);
|
||||
|
||||
final List<Widget> actions;
|
||||
final webHeight = 200;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return AppBar(
|
||||
leading: onBackCallback != null
|
||||
? IconButton(
|
||||
icon: const Icon(Icons.arrow_back_ios, color: Colors.white),
|
||||
onPressed: onBackCallback,
|
||||
)
|
||||
: null,
|
||||
backgroundColor: Globals.RP_PRIMARY_COLOR,
|
||||
centerTitle: false,
|
||||
actions: actions,
|
||||
title: const Text('Reflex Platform', style: TextStyle(color: Colors.white)),
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Size get preferredSize => Size.fromHeight(kToolbarHeight);
|
||||
}
|
||||
Reference in New Issue
Block a user