mirror of
https://github.com/SyncrowIOT/syncrow-app.git
synced 2025-11-27 11:04:54 +00:00
Fixed design issues
This commit is contained in:
@ -41,8 +41,7 @@ class SceneDevicesBody extends StatelessWidget {
|
|||||||
text: e.name ?? '',
|
text: e.name ?? '',
|
||||||
textAlign: TextAlign.start,
|
textAlign: TextAlign.start,
|
||||||
style: context.bodyLarge.copyWith(
|
style: context.bodyLarge.copyWith(
|
||||||
color: (tabState is TabSelected) &&
|
color: (tabState is TabSelected) && tabState.roomId == e.id
|
||||||
tabState.roomId == e.id
|
|
||||||
? ColorsManager.textPrimaryColor
|
? ColorsManager.textPrimaryColor
|
||||||
: ColorsManager.textPrimaryColor.withOpacity(0.2),
|
: ColorsManager.textPrimaryColor.withOpacity(0.2),
|
||||||
),
|
),
|
||||||
@ -55,6 +54,7 @@ class SceneDevicesBody extends StatelessWidget {
|
|||||||
Expanded(
|
Expanded(
|
||||||
child: TabBarView(
|
child: TabBarView(
|
||||||
controller: _tabController,
|
controller: _tabController,
|
||||||
|
physics: const NeverScrollableScrollPhysics(),
|
||||||
children: rooms!.map((e) => _buildRoomTab(e, context)).toList(),
|
children: rooms!.map((e) => _buildRoomTab(e, context)).toList(),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
@ -14,8 +14,7 @@ extension ContextExtension on BuildContext {
|
|||||||
|
|
||||||
double get height => MediaQuery.sizeOf(this).height;
|
double get height => MediaQuery.sizeOf(this).height;
|
||||||
|
|
||||||
InputDecorationTheme get inputDecoration =>
|
InputDecorationTheme get inputDecoration => Theme.of(this).inputDecorationTheme;
|
||||||
Theme.of(this).inputDecorationTheme;
|
|
||||||
|
|
||||||
TextStyle get displayLarge => Theme.of(this).textTheme.displayLarge!;
|
TextStyle get displayLarge => Theme.of(this).textTheme.displayLarge!;
|
||||||
|
|
||||||
@ -61,9 +60,7 @@ extension ContextExtension on BuildContext {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void customAlertDialog(
|
void customAlertDialog(
|
||||||
{required Widget alertBody,
|
{required Widget alertBody, required String title, required VoidCallback onConfirm}) {
|
||||||
required String title,
|
|
||||||
required VoidCallback onConfirm}) {
|
|
||||||
showDialog(
|
showDialog(
|
||||||
context: this,
|
context: this,
|
||||||
builder: (BuildContext context) {
|
builder: (BuildContext context) {
|
||||||
@ -100,7 +97,7 @@ extension ContextExtension on BuildContext {
|
|||||||
),
|
),
|
||||||
|
|
||||||
/// custom body content
|
/// custom body content
|
||||||
alertBody,
|
Flexible(child: SingleChildScrollView(child: alertBody)),
|
||||||
|
|
||||||
/// Footer buttons
|
/// Footer buttons
|
||||||
Container(
|
Container(
|
||||||
@ -118,8 +115,7 @@ extension ContextExtension on BuildContext {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: BodyMedium(
|
child: BodyMedium(
|
||||||
text: 'Cancel',
|
text: 'Cancel',
|
||||||
style: context.bodyMedium
|
style: context.bodyMedium.copyWith(color: ColorsManager.greyColor),
|
||||||
.copyWith(color: ColorsManager.greyColor),
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -133,8 +129,8 @@ extension ContextExtension on BuildContext {
|
|||||||
child: Center(
|
child: Center(
|
||||||
child: BodyMedium(
|
child: BodyMedium(
|
||||||
text: 'Confirm',
|
text: 'Confirm',
|
||||||
style: context.bodyMedium.copyWith(
|
style: context.bodyMedium
|
||||||
color: ColorsManager.primaryColorWithOpacity),
|
.copyWith(color: ColorsManager.primaryColorWithOpacity),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user