mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-16 01:56:24 +00:00
fix model and SpaceModelCardWidget and LinkSpaceModelSpacesDialog
This commit is contained in:
@ -1,5 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_bloc/flutter_bloc.dart';
|
||||
import 'package:intl/intl.dart';
|
||||
import 'package:syncrow_web/pages/space_tree/view/space_tree_view.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/link_space_model/bloc/link_space_to_model_bloc.dart';
|
||||
import 'package:syncrow_web/pages/spaces_management/link_space_model/bloc/link_space_to_model_event.dart';
|
||||
@ -45,6 +46,12 @@ class _LinkSpaceModelSpacesDialogState
|
||||
}
|
||||
|
||||
Widget _buildDialogContent() {
|
||||
widget.spaceModel.createdAt.toString();
|
||||
String formattedDate =
|
||||
DateFormat('yyyy-MM-dd').format(widget.spaceModel.createdAt!);
|
||||
String formattedTime =
|
||||
DateFormat('HH:mm:ss').format(widget.spaceModel.createdAt!);
|
||||
|
||||
return Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(15.0),
|
||||
@ -75,8 +82,31 @@ class _LinkSpaceModelSpacesDialogState
|
||||
const SizedBox(height: 16),
|
||||
_buildDetailRow(
|
||||
"Space model name:", widget.spaceModel.modelName),
|
||||
_buildDetailRow("Creation date and time:",
|
||||
widget.spaceModel.createdAt.toString()),
|
||||
Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: Row(
|
||||
children: [
|
||||
const Expanded(
|
||||
child: Text(
|
||||
"Creation date and time:",
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold),
|
||||
),
|
||||
),
|
||||
const SizedBox(width: 8),
|
||||
Expanded(
|
||||
child: Text(
|
||||
"$formattedDate $formattedTime",
|
||||
style: const TextStyle(
|
||||
fontWeight: FontWeight.bold,
|
||||
color: Colors.black),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
// _buildDetailRow("Creation date and time:",
|
||||
// widget.spaceModel.createdAt.toString()),
|
||||
_buildDetailRow("Created by:", "Admin"),
|
||||
const SizedBox(height: 12),
|
||||
const Text(
|
||||
|
Reference in New Issue
Block a user