34 lines
934 B
Dart
34 lines
934 B
Dart
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);
|
|
}
|