You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Dart
		
	
			
		
		
	
	
			38 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			Dart
		
	
import 'package:flutter/material.dart';
 | 
						|
import 'package:test_sa/extensions/context_extension.dart';
 | 
						|
import 'package:test_sa/extensions/int_extensions.dart';
 | 
						|
import 'package:test_sa/extensions/text_extensions.dart';
 | 
						|
import 'package:test_sa/extensions/widget_extensions.dart';
 | 
						|
 | 
						|
import '../app_style/app_color.dart';
 | 
						|
 | 
						|
class DefaultAppBar extends StatelessWidget implements PreferredSizeWidget {
 | 
						|
  final String title;
 | 
						|
  final List<Widget> actions;
 | 
						|
 | 
						|
  const DefaultAppBar({this.title, this.actions, Key key}) : super(key: key);
 | 
						|
 | 
						|
  @override
 | 
						|
  Widget build(BuildContext context) {
 | 
						|
    return AppBar(
 | 
						|
      automaticallyImplyLeading: false,
 | 
						|
      titleSpacing: 16,
 | 
						|
      title: Row(
 | 
						|
        children: [
 | 
						|
          const Icon(Icons.arrow_back_ios).onPress(() {
 | 
						|
            Navigator.of(context).pop();
 | 
						|
          }),
 | 
						|
          Text(
 | 
						|
            title ?? "",
 | 
						|
            style: AppTextStyles.heading3?.copyWith(fontWeight: FontWeight.w600, color: context.isDark ? AppColor.neutral30 : AppColor.neutral50),
 | 
						|
          ).expanded,
 | 
						|
        ],
 | 
						|
      ),
 | 
						|
      actions: actions,
 | 
						|
    );
 | 
						|
  }
 | 
						|
 | 
						|
  @override
 | 
						|
  Size get preferredSize => Size.fromHeight(60.toScreenHeight);
 | 
						|
}
 |