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.
39 lines
1.1 KiB
Dart
39 lines
1.1 KiB
Dart
import 'package:doctor_app_flutter/core/viewModel/project_view_model.dart';
|
|
import 'package:doctor_app_flutter/utils/tab_utils.dart';
|
|
import 'package:flutter/material.dart';
|
|
import 'package:provider/provider.dart';
|
|
|
|
class TabWidget {
|
|
static Widget tabWidget(
|
|
Size screenSize,
|
|
bool isActive,
|
|
String title, {
|
|
int counter = -1,
|
|
bool isFirst = false,
|
|
bool isMiddle = false,
|
|
bool isLast = false,
|
|
context,
|
|
}) {
|
|
ProjectViewModel projectViewModel = Provider.of(context);
|
|
return Center(
|
|
child: Container(
|
|
height: TabUtils.getTabHeight(context),
|
|
decoration: TabUtils.getBoxTabsBoxDecoration(
|
|
isActive: isActive,
|
|
isFirst: isFirst,
|
|
isMiddle: isMiddle,
|
|
isLast: isLast,
|
|
projectViewModel: projectViewModel),
|
|
child: Row(
|
|
mainAxisAlignment: MainAxisAlignment.center,
|
|
children: [
|
|
TabUtils.getTabText(title: title, isActive: isActive),
|
|
if (counter != -1)
|
|
TabUtils.getTabCounter(isActive: isActive, counter: counter)
|
|
],
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|