import 'dart:ui'; import 'package:diplomaticquarterapp/uitl/translations_delegate_base.dart'; import 'package:diplomaticquarterapp/widgets/data_display/text.dart'; import 'package:flutter/cupertino.dart'; import 'package:flutter/material.dart'; class TabBarWidget extends StatelessWidget with PreferredSizeWidget{ final TabController tabController; const TabBarWidget({Key key, this.tabController}) : super(key: key); @override Widget build(BuildContext context) { return Stack( children: [ Positioned( bottom: 1, left: 0, right: 0, child: BackdropFilter( filter: ImageFilter.blur(sigmaX: 10, sigmaY: 10), child: Container( color: Theme.of(context).scaffoldBackgroundColor.withOpacity(0.8), height: 70.0, ), ), ), Center( child: Container( height: 55.0, color: Colors.white, child: Center( child: TabBar( isScrollable: true, controller: tabController, indicatorWeight: 5.0, indicatorSize: TabBarIndicatorSize.tab, labelColor: Theme.of(context).primaryColor, labelPadding: EdgeInsets.only(top: 4.0, left: 5.0, right: 5.0), unselectedLabelColor: Colors.grey[800], tabs: [ Container( width: MediaQuery.of(context).size.width * 0.33, child: Center( child: Texts(TranslationBase.of(context).weekly), ), ), Container( width: MediaQuery.of(context).size.width * 0.33, child: Center( child: Texts(TranslationBase.of(context).monthlyT), ), ), Container( width: MediaQuery.of(context).size.width * 0.34, child: Center( child: Texts(TranslationBase.of(context).yearly), ), ), ], ), ), ), ), ], ); } @override Size get preferredSize => Size(double.maxFinite, 60); }