mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-08-26 04:59:41 +00:00
Compare commits
8 Commits
bugfix/ass
...
7f3dfebf15
Author | SHA1 | Date | |
---|---|---|---|
7f3dfebf15 | |||
b738596b50 | |||
995ce480cb | |||
b41733ee40 | |||
fe090175e3 | |||
85544c69f8 | |||
9f71bbff63 | |||
deb227034a |
@ -1,6 +1,7 @@
|
|||||||
import 'dart:async';
|
import 'dart:async';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||||
|
import 'package:syncrow_web/utils/color_manager.dart';
|
||||||
import 'space_tree_dropdown_bloc.dart';
|
import 'space_tree_dropdown_bloc.dart';
|
||||||
|
|
||||||
class DropdownMenuContent extends StatefulWidget {
|
class DropdownMenuContent extends StatefulWidget {
|
||||||
@ -75,7 +76,8 @@ class _DropdownMenuContentState extends State<DropdownMenuContent> {
|
|||||||
child: TextFormField(
|
child: TextFormField(
|
||||||
controller: _searchController,
|
controller: _searchController,
|
||||||
onChanged: _handleSearch,
|
onChanged: _handleSearch,
|
||||||
style: const TextStyle(fontSize: 14, color: Colors.black),
|
style: const TextStyle(
|
||||||
|
fontSize: 14, color: ColorsManager.blackColor),
|
||||||
decoration: InputDecoration(
|
decoration: InputDecoration(
|
||||||
hintText: 'Search for space...',
|
hintText: 'Search for space...',
|
||||||
prefixIcon: const Icon(Icons.search, size: 20),
|
prefixIcon: const Icon(Icons.search, size: 20),
|
||||||
@ -84,6 +86,12 @@ class _DropdownMenuContentState extends State<DropdownMenuContent> {
|
|||||||
border: OutlineInputBorder(
|
border: OutlineInputBorder(
|
||||||
borderRadius: BorderRadius.circular(8),
|
borderRadius: BorderRadius.circular(8),
|
||||||
),
|
),
|
||||||
|
focusedBorder: OutlineInputBorder(
|
||||||
|
borderRadius: BorderRadius.circular(8),
|
||||||
|
borderSide: const BorderSide(
|
||||||
|
color: ColorsManager.dropDownSelectBlue,
|
||||||
|
),
|
||||||
|
),
|
||||||
isDense: true,
|
isDense: true,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -117,7 +125,9 @@ class _DropdownMenuContentState extends State<DropdownMenuContent> {
|
|||||||
title: Text(
|
title: Text(
|
||||||
community.name,
|
community.name,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: isSelected ? Colors.blue : Colors.black,
|
color: isSelected
|
||||||
|
? ColorsManager.dropDownSelectBlue
|
||||||
|
: ColorsManager.blackColor,
|
||||||
fontWeight:
|
fontWeight:
|
||||||
isSelected ? FontWeight.bold : FontWeight.normal,
|
isSelected ? FontWeight.bold : FontWeight.normal,
|
||||||
),
|
),
|
||||||
|
@ -52,7 +52,7 @@ class SpaceDropdown extends StatelessWidget {
|
|||||||
fontSize: 16,
|
fontSize: 16,
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: selectedValue == space.uuid
|
color: selectedValue == space.uuid
|
||||||
? ColorsManager.dialogBlueTitle
|
? ColorsManager.dropDownSelectBlue
|
||||||
: ColorsManager.blackColor,
|
: ColorsManager.blackColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
@ -61,7 +61,7 @@ class SpaceDropdown extends StatelessWidget {
|
|||||||
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
style: Theme.of(context).textTheme.bodyMedium!.copyWith(
|
||||||
fontSize: 12,
|
fontSize: 12,
|
||||||
color: selectedValue == space.uuid
|
color: selectedValue == space.uuid
|
||||||
? ColorsManager.dialogBlueTitle
|
? ColorsManager.dropDownSelectBlue
|
||||||
: ColorsManager.blackColor,
|
: ColorsManager.blackColor,
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
@ -31,24 +31,19 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
|
|
||||||
DataColumn _buildDataColumn(BuildContext context, String label) {
|
DataColumn _buildDataColumn(BuildContext context, String label) {
|
||||||
return DataColumn(
|
return DataColumn(
|
||||||
label: Expanded(
|
label: SelectableText(label, style: context.textTheme.bodyMedium),
|
||||||
child: FittedBox(
|
|
||||||
alignment: AlignmentDirectional.centerStart,
|
|
||||||
fit: BoxFit.scaleDown,
|
|
||||||
child: SelectableText(label, style: context.textTheme.bodyMedium),
|
|
||||||
),
|
|
||||||
),
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
return BlocProvider<TagsBloc>(
|
return BlocProvider<TagsBloc>(
|
||||||
create: (context) => TagsBloc(
|
create: (BuildContext context) => TagsBloc(
|
||||||
RemoteTagsService(HTTPService()),
|
RemoteTagsService(HTTPService()),
|
||||||
)..add(const LoadTags()),
|
)..add(const LoadTags()),
|
||||||
child: BlocBuilder<TagsBloc, TagsState>(
|
child: BlocBuilder<TagsBloc, TagsState>(
|
||||||
builder: (context, state) => switch (state) {
|
builder: (context, state) {
|
||||||
|
return switch (state) {
|
||||||
TagsLoading() || TagsInitial() => const Center(
|
TagsLoading() || TagsInitial() => const Center(
|
||||||
child: CircularProgressIndicator(),
|
child: CircularProgressIndicator(),
|
||||||
),
|
),
|
||||||
@ -78,9 +73,7 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
DataRow(
|
DataRow(
|
||||||
cells: [
|
cells: [
|
||||||
DataCell(
|
DataCell(
|
||||||
FittedBox(
|
Center(
|
||||||
alignment: AlignmentDirectional.centerStart,
|
|
||||||
fit: BoxFit.scaleDown,
|
|
||||||
child: SelectableText(
|
child: SelectableText(
|
||||||
'No Devices Available',
|
'No Devices Available',
|
||||||
style: context.textTheme.bodyMedium?.copyWith(
|
style: context.textTheme.bodyMedium?.copyWith(
|
||||||
@ -112,7 +105,8 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
)
|
)
|
||||||
.toList();
|
.toList();
|
||||||
|
|
||||||
final currentLocationUuid = productLocations[allocationUuid];
|
final currentLocationUuid =
|
||||||
|
productLocations[allocationUuid];
|
||||||
final currentLocationName = currentLocationUuid == null
|
final currentLocationName = currentLocationUuid == null
|
||||||
? 'Main Space'
|
? 'Main Space'
|
||||||
: subspaces
|
: subspaces
|
||||||
@ -203,6 +197,7 @@ class AssignTagsTable extends StatelessWidget {
|
|||||||
),
|
),
|
||||||
),
|
),
|
||||||
_ => const SizedBox.shrink(),
|
_ => const SizedBox.shrink(),
|
||||||
|
};
|
||||||
},
|
},
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
@ -85,6 +85,8 @@ abstract class ColorsManager {
|
|||||||
static const Color minBlue = Color(0xFF93AAFD);
|
static const Color minBlue = Color(0xFF93AAFD);
|
||||||
static const Color minBlueDot = Color(0xFF023DFE);
|
static const Color minBlueDot = Color(0xFF023DFE);
|
||||||
static const Color grey25 = Color(0xFFF9F9F9);
|
static const Color grey25 = Color(0xFFF9F9F9);
|
||||||
|
static const Color dropDownSelectBlue = Color(0xFF2196F3);
|
||||||
|
static const Color drpoDownSelectBlue = Color(0xFF2196F3);
|
||||||
static const Color grey50 = Color(0xFF718096);
|
static const Color grey50 = Color(0xFF718096);
|
||||||
static const Color red100 = Color(0xFFFE0202);
|
static const Color red100 = Color(0xFFFE0202);
|
||||||
static const Color grey800 = Color(0xffF8F8F8);
|
static const Color grey800 = Color(0xffF8F8F8);
|
||||||
@ -93,4 +95,5 @@ abstract class ColorsManager {
|
|||||||
static const Color shadowOfDetailsContainer = Color(0x40000000);
|
static const Color shadowOfDetailsContainer = Color(0x40000000);
|
||||||
static const Color checkBoxBorderGray = Color(0xffD0D0D0);
|
static const Color checkBoxBorderGray = Color(0xffD0D0D0);
|
||||||
static const Color timePickerColor = Color(0xff000000);
|
static const Color timePickerColor = Color(0xff000000);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user