Update menu to support drawer for mobile and added new submenu (application)
This commit is contained in:
parent
edd34ae849
commit
dc2ef710f8
@ -1,15 +1,17 @@
|
||||
class MenuSection {
|
||||
String name;
|
||||
String type;
|
||||
int order;
|
||||
int menuId;
|
||||
List<MenuSection> subMenu;
|
||||
|
||||
MenuSection({required this.name, required this.type, required this.order});
|
||||
MenuSection({required this.name, required this.type, required this.menuId, required this.subMenu});
|
||||
|
||||
factory MenuSection.fromJson(Map<String, dynamic> json) {
|
||||
return new MenuSection(
|
||||
name: json['name'] as String,
|
||||
type: json['type'] as String,
|
||||
order: json['order'] as int,
|
||||
menuId: json['menuId'] as int,
|
||||
subMenu: json['subMenu'] as List<MenuSection>,
|
||||
);
|
||||
}
|
||||
|
||||
@ -17,12 +19,13 @@ class MenuSection {
|
||||
return {
|
||||
'name': name,
|
||||
'type': type,
|
||||
'order': order
|
||||
'menuId': menuId,
|
||||
'subMenu': subMenu
|
||||
};
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return '{name: $name, type: $type, order: $order}';
|
||||
return '{name: $name, type: $type, menuId: $menuId, subMenu: $subMenu}';
|
||||
}
|
||||
}
|
||||
@ -1,6 +1,7 @@
|
||||
import 'dart:html';
|
||||
|
||||
import 'package:auto_size_text/auto_size_text.dart';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:manager_app/Models/managerContext.dart';
|
||||
import 'package:manager_app/Models/menu.dart';
|
||||
@ -16,201 +17,215 @@ import 'package:manager_app/main.dart';
|
||||
import 'package:manager_api_new/api.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
|
||||
|
||||
class Body extends StatefulWidget {
|
||||
final bool showDevice;
|
||||
Body({
|
||||
Key? key,
|
||||
required this.showDevice
|
||||
}) : super(key: key);
|
||||
final InstanceDTO instance;
|
||||
Body({Key? key, required this.instance}) : super(key: key);
|
||||
|
||||
@override
|
||||
_BodyState createState() => _BodyState();
|
||||
}
|
||||
|
||||
class _BodyState extends State<Body> {
|
||||
bool isChecked = false;
|
||||
int currentPosition = 0;
|
||||
var selectedElement;
|
||||
late int currentPosition;
|
||||
late MenuSection devices;
|
||||
late MenuSection configurations;
|
||||
late MenuSection resources;
|
||||
|
||||
Menu menu = new Menu(title: "MyInfoMate");
|
||||
Menu menu = Menu(title: "MyInfoMate");
|
||||
|
||||
@override
|
||||
void initState() {
|
||||
devices = new MenuSection(name: "Tablettes", type: "devices", order: 0);
|
||||
configurations = new MenuSection(name: "Configurations", type: "configurations", order: widget.showDevice ? 1 : 0); // TODO Renommer spécifiquement en Visites pour St Heribert
|
||||
resources = new MenuSection(name: "Ressources", type: "resources", order: widget.showDevice ? 2 : 1);
|
||||
//tabsToShow.add(new Tab(text: "Vidéo en ligne"));
|
||||
|
||||
super.initState();
|
||||
devices = MenuSection(name: "Applications", type: "devices", menuId: 0, subMenu: []);
|
||||
if (widget.instance.isMobile!) devices.subMenu.add(MenuSection(name: "Mobile", type: "mobile", menuId: 1, subMenu: []));
|
||||
if (widget.instance.isTablet!) devices.subMenu.add(MenuSection(name: "Kiosk", type: "kiosk", menuId: 2, subMenu: []));
|
||||
if (widget.instance.isWeb!) devices.subMenu.add(MenuSection(name: "Web", type: "web", menuId: 3, subMenu: []));
|
||||
if (widget.instance.isVR!) devices.subMenu.add(MenuSection(name: "VR", type: "vr", menuId: 4, subMenu: []));
|
||||
|
||||
configurations = MenuSection(name: "Configurations", type: "configurations", menuId: 5, subMenu: []);
|
||||
resources = MenuSection(name: "Ressources", type: "resources", menuId: 6, subMenu: []);
|
||||
|
||||
menu.sections = [devices, configurations, resources];
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appContext = Provider.of<AppContext>(context);
|
||||
Size size = MediaQuery.of(context).size;
|
||||
|
||||
menu.sections = <MenuSection>[];
|
||||
|
||||
if(widget.showDevice) // pour ne pas perturber francoise
|
||||
{
|
||||
menu.sections!.add(devices);
|
||||
}
|
||||
|
||||
menu.sections!.add(configurations);
|
||||
menu.sections!.add(resources);
|
||||
|
||||
ManagerAppContext managerAppContext = appContext.getContext();
|
||||
|
||||
currentPosition = managerAppContext.currentPositionMenu ?? currentPosition;
|
||||
|
||||
selectedElement = initElementToShow(currentPosition, menu);
|
||||
|
||||
|
||||
return Background(
|
||||
child: Row(
|
||||
children: [
|
||||
if(true) //!ResponsiveBreakpoints.of(context).equals(TABLET)
|
||||
// MENU
|
||||
Container(
|
||||
width: size.width * 0.15,
|
||||
decoration: BoxDecoration(
|
||||
Widget buildMenu(BuildContext context, AppContext appContext, ManagerAppContext managerAppContext, bool isDrawer) {
|
||||
return Container(
|
||||
width: isDrawer ? null : 250, // fixed width on sidebar, null on drawer for full width
|
||||
color: kSecond,
|
||||
borderRadius: BorderRadius.only(topRight: Radius.circular(20), bottomRight: Radius.circular(20)),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: kSecond.withOpacity(0.3),
|
||||
spreadRadius: 0.5,
|
||||
blurRadius: 0.5,
|
||||
offset: Offset(0, 1.5), // changes position of shadow
|
||||
),
|
||||
],
|
||||
),
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
||||
children: <Widget>[
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
alignment: AlignmentDirectional.bottomStart,
|
||||
child: AutoSizeText(
|
||||
children: [
|
||||
DrawerHeader(
|
||||
child: Text(
|
||||
menu.title,
|
||||
style: new TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica"),
|
||||
maxLines: 1,
|
||||
style: TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica"),
|
||||
),
|
||||
),
|
||||
),
|
||||
Container(
|
||||
height: size.height * 0.2,
|
||||
child: Column(
|
||||
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: <Widget>[
|
||||
for (var section in menu.sections!)
|
||||
InkWell(
|
||||
onTap: () => {
|
||||
Expanded(
|
||||
child: ListView(
|
||||
padding: EdgeInsets.zero,
|
||||
children: menu.sections!.map((section) {
|
||||
if (section.subMenu.isEmpty) {
|
||||
return ListTile(
|
||||
title: Text(section.name, style: TextStyle(color: section.menuId == currentPosition ? kPrimaryColor : kBodyTextColor, fontSize: 20)),
|
||||
selected: currentPosition == section.menuId,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
currentPosition = section.order;
|
||||
currentPosition = section.menuId;
|
||||
selectedElement = initElementToShow(currentPosition, menu);
|
||||
managerAppContext.currentPositionMenu = currentPosition;
|
||||
appContext.setContext(managerAppContext);
|
||||
})
|
||||
});
|
||||
if (isDrawer) Navigator.of(context).pop(); // Close drawer on mobile
|
||||
},
|
||||
child: Container(
|
||||
alignment: AlignmentDirectional.bottomStart,
|
||||
decoration: BoxDecoration(
|
||||
border: currentPosition == section.order ? Border(
|
||||
right: BorderSide(
|
||||
color: kPrimaryColor,
|
||||
width: 4,
|
||||
);
|
||||
} else {
|
||||
return ExpansionTile(
|
||||
iconColor: currentPosition >= 1 && currentPosition <= 4 ? kPrimaryColor : kBodyTextColor,
|
||||
collapsedIconColor: currentPosition >= 1 && currentPosition <= 4 ? kPrimaryColor : kBodyTextColor,
|
||||
title: Text(section.name, style: TextStyle(color: currentPosition >= 1 && currentPosition <= 4 ? kPrimaryColor : kBodyTextColor, fontSize: 20)),
|
||||
children: section.subMenu.map((subSection) {
|
||||
return ListTile(
|
||||
title: Padding(
|
||||
padding: const EdgeInsets.only(left: 16.0),
|
||||
child: Text(subSection.name, style: TextStyle(color: subSection.menuId == currentPosition ? kPrimaryColor : kBodyTextColor, fontSize: 18)),
|
||||
),
|
||||
): null,
|
||||
),
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.only(left: 10),
|
||||
child: AutoSizeText(
|
||||
section.name,
|
||||
style: new TextStyle(color: kBodyTextColor, fontSize: 25, fontWeight: FontWeight.w300, fontFamily: "Helvetica"),
|
||||
maxLines: 1,
|
||||
selected: currentPosition == subSection.menuId,
|
||||
onTap: () {
|
||||
setState(() {
|
||||
currentPosition = subSection.menuId;
|
||||
selectedElement = initElementToShow(currentPosition, menu);
|
||||
managerAppContext.currentPositionMenu = currentPosition;
|
||||
appContext.setContext(managerAppContext);
|
||||
});
|
||||
if (isDrawer) Navigator.of(context).pop();
|
||||
},
|
||||
);
|
||||
}).toList(),
|
||||
);
|
||||
}
|
||||
}).toList(),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
]
|
||||
),
|
||||
),
|
||||
SizedBox(
|
||||
height: size.height * 0.35,
|
||||
),
|
||||
Container(
|
||||
child: Padding(
|
||||
// Footer: Email + Logout button
|
||||
Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Column(
|
||||
children: [
|
||||
AutoSizeText(
|
||||
(appContext.getContext() as ManagerAppContext).email!,
|
||||
style: new TextStyle(color: kBodyTextColor, fontSize: 20, fontWeight: FontWeight.w300, fontFamily: "Helvetica"),
|
||||
(appContext.getContext() as ManagerAppContext).email ?? "",
|
||||
style: TextStyle(color: kBodyTextColor, fontSize: 16, fontWeight: FontWeight.w300, fontFamily: "Helvetica"),
|
||||
maxLines: 1,
|
||||
),
|
||||
IconButton(
|
||||
icon: Icon(Icons.logout),
|
||||
icon: Icon(Icons.logout, color: kPrimaryColor),
|
||||
onPressed: () async {
|
||||
var session = await loadJsonSessionFile();
|
||||
|
||||
setState(() {
|
||||
print("Logout");
|
||||
Storage localStorage = window.localStorage;
|
||||
localStorage.clear();
|
||||
ManagerAppContext managerAppContext = appContext.getContext();
|
||||
managerAppContext.accessToken = null;
|
||||
appContext.setContext(managerAppContext);
|
||||
|
||||
Navigator.pushAndRemoveUntil(
|
||||
context,
|
||||
MaterialPageRoute(
|
||||
builder: (context) {
|
||||
return LoginScreen(session: session);
|
||||
},
|
||||
),
|
||||
(Route<dynamic> route) => false // For pushAndRemoveUntil
|
||||
MaterialPageRoute(builder: (context) => LoginScreen(session: session)),
|
||||
(route) => false,
|
||||
);
|
||||
|
||||
});
|
||||
},
|
||||
color: kPrimaryColor,
|
||||
),
|
||||
],
|
||||
),
|
||||
)
|
||||
)
|
||||
],
|
||||
),
|
||||
),
|
||||
// Main Container
|
||||
Container(
|
||||
width: size.width * 0.85,//!ResponsiveBreakpoints.of(context).equals(TABLET) ? size.width * 0.85 : size.width,
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
|
||||
late Widget selectedElement;
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final appContext = Provider.of<AppContext>(context);
|
||||
ManagerAppContext managerAppContext = appContext.getContext();
|
||||
|
||||
if(managerAppContext.currentPositionMenu == null) {
|
||||
if (widget.instance.isMobile!) {
|
||||
currentPosition = 1;
|
||||
} else if (widget.instance.isTablet!) {
|
||||
currentPosition = 2;
|
||||
} else if (widget.instance.isWeb!) {
|
||||
currentPosition = 3;
|
||||
} else {
|
||||
currentPosition = 4;
|
||||
}
|
||||
} else {
|
||||
currentPosition = managerAppContext.currentPositionMenu!;
|
||||
}
|
||||
|
||||
selectedElement = initElementToShow(currentPosition, menu);
|
||||
|
||||
Size size = MediaQuery.of(context).size;
|
||||
bool isMobile = size.width < 700;
|
||||
|
||||
return Scaffold(
|
||||
appBar: isMobile
|
||||
? AppBar(
|
||||
title: Text(menu.title, style: TextStyle(color: kPrimaryColor)),
|
||||
backgroundColor: kSecond,
|
||||
leading: Builder(
|
||||
builder: (context) => IconButton(
|
||||
icon: Icon(Icons.menu, color: kPrimaryColor),
|
||||
onPressed: () => Scaffold.of(context).openDrawer(),
|
||||
),
|
||||
),
|
||||
)
|
||||
: null,
|
||||
drawer: isMobile ? Drawer(child: buildMenu(context, appContext, managerAppContext, true)) : null,
|
||||
body: Row(
|
||||
children: [
|
||||
if (!isMobile)
|
||||
buildMenu(context, appContext, managerAppContext, false),
|
||||
Expanded(
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(0.0),
|
||||
child: selectedElement),
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: selectedElement,
|
||||
),
|
||||
]
|
||||
),
|
||||
],
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
initElementToShow(int currentPosition, Menu menu) {
|
||||
MenuSection elementToShow = menu.sections!.where((s) => s.order == currentPosition).first;
|
||||
MenuSection? elementToShow = menu.sections!.firstWhereOrNull((s) => s.menuId == currentPosition);
|
||||
|
||||
if(elementToShow == null) {
|
||||
elementToShow = menu.sections![0].subMenu.where((s) => s.menuId == currentPosition).first;
|
||||
}
|
||||
|
||||
switch (elementToShow.type) {
|
||||
case 'devices' :
|
||||
case 'mobile' :
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text("TODO mobile")
|
||||
);
|
||||
case 'kiosk' :
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: DevicesScreen()
|
||||
);
|
||||
case 'web' :
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text("TODO web")
|
||||
);
|
||||
case 'vr' :
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Text("TODO vr")
|
||||
);
|
||||
case 'configurations' :
|
||||
return Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:manager_api_new/api.dart';
|
||||
import 'package:manager_app/Components/common_loader.dart';
|
||||
import 'package:manager_app/Models/managerContext.dart';
|
||||
import 'package:manager_app/Models/menu.dart';
|
||||
import 'package:manager_app/Models/menuSection.dart';
|
||||
@ -19,66 +21,43 @@ class _MainScreenState extends State<MainScreen> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final GlobalKey<_MainScreenState> key = GlobalKey();
|
||||
|
||||
final appContext = Provider.of<AppContext>(context);
|
||||
Size size = MediaQuery.of(context).size;
|
||||
ManagerAppContext managerAppContext = appContext.getContext();
|
||||
|
||||
var isFortSt = managerAppContext.instanceId == "633ee379d9405f32f166f047";
|
||||
//var isFortSt = managerAppContext.instanceId == "633ee379d9405f32f166f047";
|
||||
|
||||
if(!ResponsiveBreakpoints.of(context).equals(TABLET) || isFortSt) {
|
||||
return FutureBuilder(
|
||||
future: getInstanceInfo(managerAppContext),
|
||||
builder: (context, AsyncSnapshot<InstanceDTO?> snapshot) {
|
||||
if (snapshot.connectionState == ConnectionState.done) {
|
||||
if (snapshot.data != null) {
|
||||
var instanceDTO = snapshot.data;
|
||||
return Scaffold(
|
||||
key: key,
|
||||
body: Body(showDevice: !isFortSt),
|
||||
body: Body(instance: instanceDTO!),
|
||||
);
|
||||
} else {
|
||||
return Scaffold(
|
||||
key: key,
|
||||
appBar: AppBar(title: Text("MyInfoMate", style: new TextStyle(color: kPrimaryColor, fontSize: 30, fontWeight: FontWeight.w400, fontFamily: "Helvetica")), backgroundColor: kSecond.withOpacity(0.3), iconTheme: IconThemeData(color: kPrimaryColor)),
|
||||
drawer: Drawer(
|
||||
child: getMenu()
|
||||
),
|
||||
body: Body(showDevice: isFortSt),
|
||||
);
|
||||
return Text("No data");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
getMenu() {
|
||||
MenuSection devices = new MenuSection(name: "Tablettes", type: "devices", order: 0);
|
||||
MenuSection configurations = new MenuSection(name: "Configurations", type: "configurations", order: 1); // TODO Visites pour Fort St Héribert
|
||||
MenuSection resources = new MenuSection(name: "Ressources", type: "resources", order: 2);
|
||||
|
||||
Menu menu = new Menu(title: "MyInfoMate");
|
||||
|
||||
return ListView(
|
||||
// Important: Remove any padding from the ListView.
|
||||
padding: EdgeInsets.zero,
|
||||
children: [
|
||||
DrawerHeader(
|
||||
decoration: BoxDecoration(
|
||||
color: kPrimaryColor,
|
||||
),
|
||||
child: Text(menu.title),
|
||||
),
|
||||
ListTile(
|
||||
title: Text(devices.name),
|
||||
onTap: () {
|
||||
// TODO Navigate to configurations screen (by route if possible)
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(configurations.name),
|
||||
onTap: () {
|
||||
// TODO Navigate to configurations screen (by route if possible)
|
||||
},
|
||||
),
|
||||
ListTile(
|
||||
title: Text(resources.name),
|
||||
onTap: () {
|
||||
// TODO Navigate to resources screen (by route if possible)
|
||||
},
|
||||
),
|
||||
],
|
||||
} else if (snapshot.connectionState == ConnectionState.none) {
|
||||
return Text("No data");
|
||||
} else {
|
||||
return Center(
|
||||
child: Container(
|
||||
height: size.height * 0.1,
|
||||
child: CommonLoader()
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Future<InstanceDTO?> getInstanceInfo(ManagerAppContext managerAppContext) async {
|
||||
InstanceDTO? instance = await managerAppContext.clientAPI!.instanceApi!.instanceGetDetail(managerAppContext.instanceId!);
|
||||
return instance;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -254,7 +254,7 @@ class _LoginScreenState extends State<LoginScreen> {
|
||||
borderRadius: BorderRadius.circular(8.0),
|
||||
boxShadow: [
|
||||
BoxShadow(
|
||||
color: kWhite.withOpacity(0.3),
|
||||
color: kWhite.withValues(alpha: 0.3),
|
||||
spreadRadius: 0.5,
|
||||
blurRadius: 0.5,
|
||||
offset: Offset(0, 1.5), // changes position of shadow
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
// Openapi Generator last run: : 2025-07-17T12:00:29.078649
|
||||
// Openapi Generator last run: : 2025-08-01T15:25:28.408371
|
||||
import 'package:openapi_generator_annotations/openapi_generator_annotations.dart';
|
||||
|
||||
@Openapi(
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
"info": {
|
||||
"title": "Manager Service",
|
||||
"description": "API Manager Service",
|
||||
"version": "Version Alpha 0.1"
|
||||
"version": "Version Alpha"
|
||||
},
|
||||
"servers": [
|
||||
{
|
||||
@ -7078,6 +7078,9 @@
|
||||
"isTablet": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isWeb": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isVR": {
|
||||
"type": "boolean"
|
||||
}
|
||||
@ -7116,6 +7119,9 @@
|
||||
"isTablet": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isWeb": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"isVR": {
|
||||
"type": "boolean"
|
||||
}
|
||||
|
||||
@ -11,6 +11,9 @@ class Client {
|
||||
UserApi? _userApi;
|
||||
UserApi? get userApi => _userApi;
|
||||
|
||||
InstanceApi? _instanceApi;
|
||||
InstanceApi? get instanceApi => _instanceApi;
|
||||
|
||||
ConfigurationApi? _configurationApi;
|
||||
ConfigurationApi? get configurationApi => _configurationApi;
|
||||
|
||||
@ -36,6 +39,7 @@ class Client {
|
||||
//basePath: "https://localhost:44339");
|
||||
_apiClient!.addDefaultHeader("Access-Control_Allow_Origin", "*");
|
||||
_authenticationApi = AuthenticationApi(_apiClient);
|
||||
_instanceApi = InstanceApi(_apiClient);
|
||||
_userApi = UserApi(_apiClient);
|
||||
_configurationApi = ConfigurationApi(_apiClient);
|
||||
_sectionApi = SectionApi(_apiClient);
|
||||
|
||||
@ -261,64 +261,3 @@ lib/model/video_dto.dart
|
||||
lib/model/weather_dto.dart
|
||||
lib/model/web_dto.dart
|
||||
pubspec.yaml
|
||||
test/app_configuration_link_application_instance_test.dart
|
||||
test/app_configuration_link_configuration_test.dart
|
||||
test/app_configuration_link_dto_test.dart
|
||||
test/app_configuration_link_test.dart
|
||||
test/app_type_test.dart
|
||||
test/application_instance_dto_test.dart
|
||||
test/application_instance_section_event_test.dart
|
||||
test/application_instance_test.dart
|
||||
test/configuration_test.dart
|
||||
test/coordinate_equality_comparer_test.dart
|
||||
test/coordinate_sequence_factory_test.dart
|
||||
test/coordinate_sequence_test.dart
|
||||
test/coordinate_test.dart
|
||||
test/dimension_test.dart
|
||||
test/envelope_test.dart
|
||||
test/event_address_dto_geometry_test.dart
|
||||
test/event_address_dto_test.dart
|
||||
test/event_agenda_dto_address_test.dart
|
||||
test/event_agenda_dto_resource_test.dart
|
||||
test/event_agenda_dto_test.dart
|
||||
test/geometry_centroid_test.dart
|
||||
test/geometry_dto_test.dart
|
||||
test/geometry_envelope_internal_test.dart
|
||||
test/geometry_factory_coordinate_sequence_factory_test.dart
|
||||
test/geometry_factory_geometry_services_test.dart
|
||||
test/geometry_factory_test.dart
|
||||
test/geometry_precision_model_test.dart
|
||||
test/geometry_test.dart
|
||||
test/geometry_type_test.dart
|
||||
test/guided_path_dto_test.dart
|
||||
test/guided_path_section_map_test.dart
|
||||
test/guided_path_test.dart
|
||||
test/guided_step_dto_test.dart
|
||||
test/guided_step_dto_trigger_geo_point_test.dart
|
||||
test/guided_step_guided_path_test.dart
|
||||
test/guided_step_test.dart
|
||||
test/guided_step_trigger_geo_point_test.dart
|
||||
test/layout_main_page_type_test.dart
|
||||
test/map_annotation_dto_test.dart
|
||||
test/map_annotation_geometry_test.dart
|
||||
test/map_annotation_icon_resource_test.dart
|
||||
test/map_annotation_test.dart
|
||||
test/nts_geometry_services_coordinate_equality_comparer_test.dart
|
||||
test/nts_geometry_services_geometry_overlay_test.dart
|
||||
test/nts_geometry_services_test.dart
|
||||
test/ogc_geometry_type_test.dart
|
||||
test/ordinates_test.dart
|
||||
test/point_all_of_boundary_test.dart
|
||||
test/point_all_of_coordinate_sequence_test.dart
|
||||
test/point_all_of_coordinate_test.dart
|
||||
test/point_test.dart
|
||||
test/precision_model_test.dart
|
||||
test/precision_models_test.dart
|
||||
test/programme_block_dto_test.dart
|
||||
test/programme_block_test.dart
|
||||
test/question_type_test.dart
|
||||
test/quiz_question_guided_step_test.dart
|
||||
test/section_agenda_api_test.dart
|
||||
test/section_event_api_test.dart
|
||||
test/section_event_dto_test.dart
|
||||
test/section_event_test.dart
|
||||
|
||||
@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
||||
**isStatistic** | **bool** | | [optional]
|
||||
**isMobile** | **bool** | | [optional]
|
||||
**isTablet** | **bool** | | [optional]
|
||||
**isWeb** | **bool** | | [optional]
|
||||
**isVR** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@ -16,6 +16,7 @@ Name | Type | Description | Notes
|
||||
**isStatistic** | **bool** | | [optional]
|
||||
**isMobile** | **bool** | | [optional]
|
||||
**isTablet** | **bool** | | [optional]
|
||||
**isWeb** | **bool** | | [optional]
|
||||
**isVR** | **bool** | | [optional]
|
||||
|
||||
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
|
||||
|
||||
@ -21,6 +21,7 @@ class Instance {
|
||||
this.isStatistic,
|
||||
this.isMobile,
|
||||
this.isTablet,
|
||||
this.isWeb,
|
||||
this.isVR,
|
||||
});
|
||||
|
||||
@ -70,6 +71,14 @@ class Instance {
|
||||
///
|
||||
bool? isTablet;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isWeb;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
@ -90,6 +99,7 @@ class Instance {
|
||||
other.isStatistic == isStatistic &&
|
||||
other.isMobile == isMobile &&
|
||||
other.isTablet == isTablet &&
|
||||
other.isWeb == isWeb &&
|
||||
other.isVR == isVR;
|
||||
|
||||
@override
|
||||
@ -103,11 +113,12 @@ class Instance {
|
||||
(isStatistic == null ? 0 : isStatistic!.hashCode) +
|
||||
(isMobile == null ? 0 : isMobile!.hashCode) +
|
||||
(isTablet == null ? 0 : isTablet!.hashCode) +
|
||||
(isWeb == null ? 0 : isWeb!.hashCode) +
|
||||
(isVR == null ? 0 : isVR!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode, isPushNotification=$isPushNotification, isStatistic=$isStatistic, isMobile=$isMobile, isTablet=$isTablet, isVR=$isVR]';
|
||||
'Instance[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode, isPushNotification=$isPushNotification, isStatistic=$isStatistic, isMobile=$isMobile, isTablet=$isTablet, isWeb=$isWeb, isVR=$isVR]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -143,6 +154,11 @@ class Instance {
|
||||
} else {
|
||||
json[r'isTablet'] = null;
|
||||
}
|
||||
if (this.isWeb != null) {
|
||||
json[r'isWeb'] = this.isWeb;
|
||||
} else {
|
||||
json[r'isWeb'] = null;
|
||||
}
|
||||
if (this.isVR != null) {
|
||||
json[r'isVR'] = this.isVR;
|
||||
} else {
|
||||
@ -180,6 +196,7 @@ class Instance {
|
||||
isStatistic: mapValueOfType<bool>(json, r'isStatistic'),
|
||||
isMobile: mapValueOfType<bool>(json, r'isMobile'),
|
||||
isTablet: mapValueOfType<bool>(json, r'isTablet'),
|
||||
isWeb: mapValueOfType<bool>(json, r'isWeb'),
|
||||
isVR: mapValueOfType<bool>(json, r'isVR'),
|
||||
);
|
||||
}
|
||||
|
||||
@ -21,6 +21,7 @@ class InstanceDTO {
|
||||
this.isStatistic,
|
||||
this.isMobile,
|
||||
this.isTablet,
|
||||
this.isWeb,
|
||||
this.isVR,
|
||||
});
|
||||
|
||||
@ -64,6 +65,14 @@ class InstanceDTO {
|
||||
///
|
||||
bool? isTablet;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
/// source code must fall back to having a nullable type.
|
||||
/// Consider adding a "default:" property in the specification file to hide this note.
|
||||
///
|
||||
bool? isWeb;
|
||||
|
||||
///
|
||||
/// Please note: This property should have been non-nullable! Since the specification file
|
||||
/// does not include a default value (using the "default:" property), however, the generated
|
||||
@ -84,6 +93,7 @@ class InstanceDTO {
|
||||
other.isStatistic == isStatistic &&
|
||||
other.isMobile == isMobile &&
|
||||
other.isTablet == isTablet &&
|
||||
other.isWeb == isWeb &&
|
||||
other.isVR == isVR;
|
||||
|
||||
@override
|
||||
@ -97,11 +107,12 @@ class InstanceDTO {
|
||||
(isStatistic == null ? 0 : isStatistic!.hashCode) +
|
||||
(isMobile == null ? 0 : isMobile!.hashCode) +
|
||||
(isTablet == null ? 0 : isTablet!.hashCode) +
|
||||
(isWeb == null ? 0 : isWeb!.hashCode) +
|
||||
(isVR == null ? 0 : isVR!.hashCode);
|
||||
|
||||
@override
|
||||
String toString() =>
|
||||
'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode, isPushNotification=$isPushNotification, isStatistic=$isStatistic, isMobile=$isMobile, isTablet=$isTablet, isVR=$isVR]';
|
||||
'InstanceDTO[id=$id, name=$name, dateCreation=$dateCreation, pinCode=$pinCode, isPushNotification=$isPushNotification, isStatistic=$isStatistic, isMobile=$isMobile, isTablet=$isTablet, isWeb=$isWeb, isVR=$isVR]';
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final json = <String, dynamic>{};
|
||||
@ -145,6 +156,11 @@ class InstanceDTO {
|
||||
} else {
|
||||
json[r'isTablet'] = null;
|
||||
}
|
||||
if (this.isWeb != null) {
|
||||
json[r'isWeb'] = this.isWeb;
|
||||
} else {
|
||||
json[r'isWeb'] = null;
|
||||
}
|
||||
if (this.isVR != null) {
|
||||
json[r'isVR'] = this.isVR;
|
||||
} else {
|
||||
@ -182,6 +198,7 @@ class InstanceDTO {
|
||||
isStatistic: mapValueOfType<bool>(json, r'isStatistic'),
|
||||
isMobile: mapValueOfType<bool>(json, r'isMobile'),
|
||||
isTablet: mapValueOfType<bool>(json, r'isTablet'),
|
||||
isWeb: mapValueOfType<bool>(json, r'isWeb'),
|
||||
isVR: mapValueOfType<bool>(json, r'isVR'),
|
||||
);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user