feat: major progress

This commit is contained in:
Yandrik 2024-04-21 02:22:53 +02:00
parent 13327da5de
commit e653010458
18 changed files with 1464 additions and 59 deletions

View File

@ -14,7 +14,10 @@ class ColorfulChip extends StatelessWidget {
labelStyle: TextStyle(
color: color.computeLuminance() > 0.5 ? Colors.black : Colors.white,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: BorderSide.none,
),
);
}
}
@ -22,11 +25,13 @@ class ColorfulChip extends StatelessWidget {
class ColorfulActionChip extends StatelessWidget {
final String label;
final VoidCallback onPressed;
final double? size;
const ColorfulActionChip({
Key? key,
required this.label,
required this.onPressed,
this.size,
}) : super(key: key);
@override
@ -38,9 +43,15 @@ class ColorfulActionChip extends StatelessWidget {
backgroundColor: color,
labelStyle: TextStyle(
color: color.computeLuminance() > 0.5 ? Colors.black : Colors.white,
fontSize: size,
),
shape: RoundedRectangleBorder(
borderRadius: BorderRadius.circular(8),
side: BorderSide.none,
),
shape: RoundedRectangleBorder(borderRadius: BorderRadius.circular(8)),
onPressed: onPressed,
padding: EdgeInsets.symmetric(
horizontal: (size ?? 16) / 2, vertical: (size ?? 8.0) / 2),
);
}
}

View File

@ -18,7 +18,9 @@ Future<void> showFeatureBottomSheet(
Theme(
data: ThemeData.light(),
child: Container(
height: 300,
constraints: const BoxConstraints(
minHeight: 300,
),
width: Get.mediaQuery.size.width,
decoration: const BoxDecoration(
color: Colors.black,
@ -26,7 +28,7 @@ Future<void> showFeatureBottomSheet(
topLeft: Radius.circular(30), topRight: Radius.circular(30)),
),
padding: const EdgeInsets.all(20),
child: Column(children: [
child: Column(mainAxisSize: MainAxisSize.min, children: [
Center(
child: Container(
width: 50,
@ -65,6 +67,10 @@ Future<void> showFeatureBottomSheet(
),
const SizedBox(height: 14),
],
if (feature.description != null) ...[
Text(feature.description!),
const SizedBox(height: 10),
],
..._buildFeatureContent(feature),
]),
),
@ -113,17 +119,89 @@ List<Widget> _buildDoorContent(Feature feature, List<String> connects) {
/// Builds the content for the Toilet feature type.
List<Widget> _buildToiletContent(Feature feature, String toiletType) {
return [Text('Toilet: ${feature.name}\nType: $toiletType')];
return [
Row(
mainAxisAlignment: MainAxisAlignment.center,
children: [
const Icon(
Icons.wc,
size: 60,
color: Colors.white,
),
Icon(
findToiletIcon(toiletType),
size: 60,
color: Colors.white,
)
],
)
];
}
/// Builds the content for the Stairs feature type.
List<Widget> _buildStairsContent(Feature feature, List<int> connectsLevels) {
return [Text('Stairs: ${feature.name}\nConnects Levels: $connectsLevels')];
return [
Text(
feature.name,
style: const TextStyle(fontSize: 18),
),
const SizedBox(height: 10),
if (connectsLevels.isNotEmpty) ...[
const Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: EdgeInsets.only(right: 4),
child: Text(
'Connects Levels:',
style: TextStyle(fontWeight: FontWeight.bold),
),
),
),
Align(
alignment: Alignment.centerLeft,
child: Wrap(
spacing: 8,
runSpacing: 4,
children: connectsLevels.map((level) {
return ColorfulChip(label: level.toString());
}).toList(),
),
),
],
];
}
/// Builds the content for the Lift feature type.
List<Widget> _buildLiftContent(Feature feature, List<int> connectsLevels) {
return [Text('Lift: ${feature.name}\nConnects Levels: $connectsLevels')];
return [
Text(
feature.name,
style: const TextStyle(fontSize: 18),
),
const SizedBox(height: 10),
if (connectsLevels.isNotEmpty) ...[
const Align(
alignment: Alignment.centerLeft,
child: Padding(
padding: EdgeInsets.only(right: 4),
child: Text(
'Connects Levels:',
style: TextStyle(fontWeight: FontWeight.bold),
),
),
),
Align(
alignment: Alignment.centerLeft,
child: Wrap(
spacing: 8,
runSpacing: 4,
children: connectsLevels.map((level) {
return ColorfulChip(label: level.toString());
}).toList(),
),
),
],
];
}
/// Builds the content for the PublicTransport feature type.

View File

@ -8,6 +8,7 @@ import 'package:uninav/controllers/map_controller.dart';
import 'package:uninav/data/geo/model.dart';
import 'package:uninav/map.dart';
import 'package:uninav/util/geomath.dart';
import 'package:uninav/util/util.dart';
List<Widget> renderLevel(int level, {LayerHitNotifier? hitNotifier}) {
return <Widget>[
@ -77,24 +78,6 @@ List<Widget> renderLevel(int level, {LayerHitNotifier? hitNotifier}) {
filter: (feature) => feature.level == level && feature.type is Toilet,
markerConstructor: (feature) {
final type = (feature.type as Toilet).toilet_type;
IconData icon;
switch (type.toLowerCase()) {
case 'male':
icon = Icons.male;
break;
case 'female':
icon = Icons.female;
break;
case 'handicap':
icon = Icons.wheelchair_pickup;
break;
default:
print("WARN: Toilet didn't have recognizable type! "
"(Level ${feature.level}, Name ${feature.name}, "
"Location: ${feature.getPoint().unwrap()})");
icon = Icons.wc;
break;
}
final point = feature.getPoint().unwrap();
return Marker(
@ -102,7 +85,7 @@ List<Widget> renderLevel(int level, {LayerHitNotifier? hitNotifier}) {
height: 21,
point: point,
child: Icon(
icon,
findToiletIcon(type),
color: Colors.purple,
),
alignment: Alignment.center,

View File

@ -0,0 +1,74 @@
import 'package:get/get.dart';
import 'package:isar/isar.dart';
import 'package:path_provider/path_provider.dart';
part 'isar_controller.g.dart';
/// Manages the initialization and access to the Isar database instance.
///
/// The `IsarController` class is responsible for initializing the Isar database
/// and providing access to the database instance. It ensures that the Isar
/// instance is properly initialized before it can be accessed.
///
/// The `initializeIsar()` method is used to initialize the Isar instance by
/// opening the database with the provided schema. Make sure to call this before
/// calling anything else!. The `isar` getter returns the
/// Isar instance, throwing an exception if the instance is not yet initialized.
class IsarController {
late Isar _isar;
late final Rx<Settings> settings;
IsarController();
Future<void> initializeIsar() async {
final dir = await getApplicationDocumentsDirectory();
_isar = await Isar.open(
[SettingsSchema],
directory: dir.path,
);
settings = (await _isar.settings.get(1) ?? Settings()).obs;
_isar.settings.watchObject(1).forEach((element) {
if (element != null) settings.value = element;
});
}
Future<void> persistSettings() async {
await _isar.writeTxn(() async {
await _isar.settings.put(settings.value);
});
}
Isar get isar {
if (_isar == null) {
throw Exception('Isar is not initialized');
}
return _isar;
}
}
@collection
class Settings {
Id id = 1;
bool showIcons = true;
bool showElevators = true;
bool showFoodAndDrink = true;
bool showLectureHalls = true;
bool showComputerPools = true;
bool showSeminarRooms = true;
bool showToilets = true;
bool showStairs = true;
bool showDoors = true;
bool maleToilets = false;
bool femaleToilets = false;
bool handicapToilets = false;
}
enum ToiletPreference {
male,
female,
disabled,
}

View File

@ -0,0 +1,910 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'isar_controller.dart';
// **************************************************************************
// IsarCollectionGenerator
// **************************************************************************
// coverage:ignore-file
// ignore_for_file: duplicate_ignore, non_constant_identifier_names, constant_identifier_names, invalid_use_of_protected_member, unnecessary_cast, prefer_const_constructors, lines_longer_than_80_chars, require_trailing_commas, inference_failure_on_function_invocation, unnecessary_parenthesis, unnecessary_raw_strings, unnecessary_null_checks, join_return_with_assignment, prefer_final_locals, avoid_js_rounded_ints, avoid_positional_boolean_parameters, always_specify_types
extension GetSettingsCollection on Isar {
IsarCollection<Settings> get settings => this.collection();
}
const SettingsSchema = CollectionSchema(
name: r'Settings',
id: -8656046621518759136,
properties: {
r'femaleToilets': PropertySchema(
id: 0,
name: r'femaleToilets',
type: IsarType.bool,
),
r'handicapToilets': PropertySchema(
id: 1,
name: r'handicapToilets',
type: IsarType.bool,
),
r'maleToilets': PropertySchema(
id: 2,
name: r'maleToilets',
type: IsarType.bool,
),
r'showComputerPools': PropertySchema(
id: 3,
name: r'showComputerPools',
type: IsarType.bool,
),
r'showDoors': PropertySchema(
id: 4,
name: r'showDoors',
type: IsarType.bool,
),
r'showElevators': PropertySchema(
id: 5,
name: r'showElevators',
type: IsarType.bool,
),
r'showFoodAndDrink': PropertySchema(
id: 6,
name: r'showFoodAndDrink',
type: IsarType.bool,
),
r'showIcons': PropertySchema(
id: 7,
name: r'showIcons',
type: IsarType.bool,
),
r'showLectureHalls': PropertySchema(
id: 8,
name: r'showLectureHalls',
type: IsarType.bool,
),
r'showSeminarRooms': PropertySchema(
id: 9,
name: r'showSeminarRooms',
type: IsarType.bool,
),
r'showStairs': PropertySchema(
id: 10,
name: r'showStairs',
type: IsarType.bool,
),
r'showToilets': PropertySchema(
id: 11,
name: r'showToilets',
type: IsarType.bool,
)
},
estimateSize: _settingsEstimateSize,
serialize: _settingsSerialize,
deserialize: _settingsDeserialize,
deserializeProp: _settingsDeserializeProp,
idName: r'id',
indexes: {},
links: {},
embeddedSchemas: {},
getId: _settingsGetId,
getLinks: _settingsGetLinks,
attach: _settingsAttach,
version: '3.1.0+1',
);
int _settingsEstimateSize(
Settings object,
List<int> offsets,
Map<Type, List<int>> allOffsets,
) {
var bytesCount = offsets.last;
return bytesCount;
}
void _settingsSerialize(
Settings object,
IsarWriter writer,
List<int> offsets,
Map<Type, List<int>> allOffsets,
) {
writer.writeBool(offsets[0], object.femaleToilets);
writer.writeBool(offsets[1], object.handicapToilets);
writer.writeBool(offsets[2], object.maleToilets);
writer.writeBool(offsets[3], object.showComputerPools);
writer.writeBool(offsets[4], object.showDoors);
writer.writeBool(offsets[5], object.showElevators);
writer.writeBool(offsets[6], object.showFoodAndDrink);
writer.writeBool(offsets[7], object.showIcons);
writer.writeBool(offsets[8], object.showLectureHalls);
writer.writeBool(offsets[9], object.showSeminarRooms);
writer.writeBool(offsets[10], object.showStairs);
writer.writeBool(offsets[11], object.showToilets);
}
Settings _settingsDeserialize(
Id id,
IsarReader reader,
List<int> offsets,
Map<Type, List<int>> allOffsets,
) {
final object = Settings();
object.femaleToilets = reader.readBool(offsets[0]);
object.handicapToilets = reader.readBool(offsets[1]);
object.id = id;
object.maleToilets = reader.readBool(offsets[2]);
object.showComputerPools = reader.readBool(offsets[3]);
object.showDoors = reader.readBool(offsets[4]);
object.showElevators = reader.readBool(offsets[5]);
object.showFoodAndDrink = reader.readBool(offsets[6]);
object.showIcons = reader.readBool(offsets[7]);
object.showLectureHalls = reader.readBool(offsets[8]);
object.showSeminarRooms = reader.readBool(offsets[9]);
object.showStairs = reader.readBool(offsets[10]);
object.showToilets = reader.readBool(offsets[11]);
return object;
}
P _settingsDeserializeProp<P>(
IsarReader reader,
int propertyId,
int offset,
Map<Type, List<int>> allOffsets,
) {
switch (propertyId) {
case 0:
return (reader.readBool(offset)) as P;
case 1:
return (reader.readBool(offset)) as P;
case 2:
return (reader.readBool(offset)) as P;
case 3:
return (reader.readBool(offset)) as P;
case 4:
return (reader.readBool(offset)) as P;
case 5:
return (reader.readBool(offset)) as P;
case 6:
return (reader.readBool(offset)) as P;
case 7:
return (reader.readBool(offset)) as P;
case 8:
return (reader.readBool(offset)) as P;
case 9:
return (reader.readBool(offset)) as P;
case 10:
return (reader.readBool(offset)) as P;
case 11:
return (reader.readBool(offset)) as P;
default:
throw IsarError('Unknown property with id $propertyId');
}
}
Id _settingsGetId(Settings object) {
return object.id;
}
List<IsarLinkBase<dynamic>> _settingsGetLinks(Settings object) {
return [];
}
void _settingsAttach(IsarCollection<dynamic> col, Id id, Settings object) {
object.id = id;
}
extension SettingsQueryWhereSort on QueryBuilder<Settings, Settings, QWhere> {
QueryBuilder<Settings, Settings, QAfterWhere> anyId() {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(const IdWhereClause.any());
});
}
}
extension SettingsQueryWhere on QueryBuilder<Settings, Settings, QWhereClause> {
QueryBuilder<Settings, Settings, QAfterWhereClause> idEqualTo(Id id) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IdWhereClause.between(
lower: id,
upper: id,
));
});
}
QueryBuilder<Settings, Settings, QAfterWhereClause> idNotEqualTo(Id id) {
return QueryBuilder.apply(this, (query) {
if (query.whereSort == Sort.asc) {
return query
.addWhereClause(
IdWhereClause.lessThan(upper: id, includeUpper: false),
)
.addWhereClause(
IdWhereClause.greaterThan(lower: id, includeLower: false),
);
} else {
return query
.addWhereClause(
IdWhereClause.greaterThan(lower: id, includeLower: false),
)
.addWhereClause(
IdWhereClause.lessThan(upper: id, includeUpper: false),
);
}
});
}
QueryBuilder<Settings, Settings, QAfterWhereClause> idGreaterThan(Id id,
{bool include = false}) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(
IdWhereClause.greaterThan(lower: id, includeLower: include),
);
});
}
QueryBuilder<Settings, Settings, QAfterWhereClause> idLessThan(Id id,
{bool include = false}) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(
IdWhereClause.lessThan(upper: id, includeUpper: include),
);
});
}
QueryBuilder<Settings, Settings, QAfterWhereClause> idBetween(
Id lowerId,
Id upperId, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addWhereClause(IdWhereClause.between(
lower: lowerId,
includeLower: includeLower,
upper: upperId,
includeUpper: includeUpper,
));
});
}
}
extension SettingsQueryFilter
on QueryBuilder<Settings, Settings, QFilterCondition> {
QueryBuilder<Settings, Settings, QAfterFilterCondition> femaleToiletsEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'femaleToilets',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition>
handicapToiletsEqualTo(bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'handicapToilets',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> idEqualTo(Id value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'id',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> idGreaterThan(
Id value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.greaterThan(
include: include,
property: r'id',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> idLessThan(
Id value, {
bool include = false,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.lessThan(
include: include,
property: r'id',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> idBetween(
Id lower,
Id upper, {
bool includeLower = true,
bool includeUpper = true,
}) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.between(
property: r'id',
lower: lower,
includeLower: includeLower,
upper: upper,
includeUpper: includeUpper,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> maleToiletsEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'maleToilets',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition>
showComputerPoolsEqualTo(bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showComputerPools',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> showDoorsEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showDoors',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> showElevatorsEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showElevators',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition>
showFoodAndDrinkEqualTo(bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showFoodAndDrink',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> showIconsEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showIcons',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition>
showLectureHallsEqualTo(bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showLectureHalls',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition>
showSeminarRoomsEqualTo(bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showSeminarRooms',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> showStairsEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showStairs',
value: value,
));
});
}
QueryBuilder<Settings, Settings, QAfterFilterCondition> showToiletsEqualTo(
bool value) {
return QueryBuilder.apply(this, (query) {
return query.addFilterCondition(FilterCondition.equalTo(
property: r'showToilets',
value: value,
));
});
}
}
extension SettingsQueryObject
on QueryBuilder<Settings, Settings, QFilterCondition> {}
extension SettingsQueryLinks
on QueryBuilder<Settings, Settings, QFilterCondition> {}
extension SettingsQuerySortBy on QueryBuilder<Settings, Settings, QSortBy> {
QueryBuilder<Settings, Settings, QAfterSortBy> sortByFemaleToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'femaleToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByFemaleToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'femaleToilets', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByHandicapToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'handicapToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByHandicapToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'handicapToilets', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByMaleToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'maleToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByMaleToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'maleToilets', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowComputerPools() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showComputerPools', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowComputerPoolsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showComputerPools', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowDoors() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showDoors', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowDoorsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showDoors', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowElevators() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showElevators', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowElevatorsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showElevators', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowFoodAndDrink() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showFoodAndDrink', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowFoodAndDrinkDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showFoodAndDrink', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowIcons() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showIcons', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowIconsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showIcons', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowLectureHalls() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showLectureHalls', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowLectureHallsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showLectureHalls', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowSeminarRooms() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showSeminarRooms', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowSeminarRoomsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showSeminarRooms', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowStairs() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showStairs', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowStairsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showStairs', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> sortByShowToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showToilets', Sort.desc);
});
}
}
extension SettingsQuerySortThenBy
on QueryBuilder<Settings, Settings, QSortThenBy> {
QueryBuilder<Settings, Settings, QAfterSortBy> thenByFemaleToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'femaleToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByFemaleToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'femaleToilets', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByHandicapToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'handicapToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByHandicapToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'handicapToilets', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenById() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'id', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByIdDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'id', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByMaleToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'maleToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByMaleToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'maleToilets', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowComputerPools() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showComputerPools', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowComputerPoolsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showComputerPools', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowDoors() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showDoors', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowDoorsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showDoors', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowElevators() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showElevators', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowElevatorsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showElevators', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowFoodAndDrink() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showFoodAndDrink', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowFoodAndDrinkDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showFoodAndDrink', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowIcons() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showIcons', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowIconsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showIcons', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowLectureHalls() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showLectureHalls', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowLectureHallsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showLectureHalls', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowSeminarRooms() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showSeminarRooms', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowSeminarRoomsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showSeminarRooms', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowStairs() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showStairs', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowStairsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showStairs', Sort.desc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowToilets() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showToilets', Sort.asc);
});
}
QueryBuilder<Settings, Settings, QAfterSortBy> thenByShowToiletsDesc() {
return QueryBuilder.apply(this, (query) {
return query.addSortBy(r'showToilets', Sort.desc);
});
}
}
extension SettingsQueryWhereDistinct
on QueryBuilder<Settings, Settings, QDistinct> {
QueryBuilder<Settings, Settings, QDistinct> distinctByFemaleToilets() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'femaleToilets');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByHandicapToilets() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'handicapToilets');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByMaleToilets() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'maleToilets');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowComputerPools() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showComputerPools');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowDoors() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showDoors');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowElevators() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showElevators');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowFoodAndDrink() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showFoodAndDrink');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowIcons() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showIcons');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowLectureHalls() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showLectureHalls');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowSeminarRooms() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showSeminarRooms');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowStairs() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showStairs');
});
}
QueryBuilder<Settings, Settings, QDistinct> distinctByShowToilets() {
return QueryBuilder.apply(this, (query) {
return query.addDistinctBy(r'showToilets');
});
}
}
extension SettingsQueryProperty
on QueryBuilder<Settings, Settings, QQueryProperty> {
QueryBuilder<Settings, int, QQueryOperations> idProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'id');
});
}
QueryBuilder<Settings, bool, QQueryOperations> femaleToiletsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'femaleToilets');
});
}
QueryBuilder<Settings, bool, QQueryOperations> handicapToiletsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'handicapToilets');
});
}
QueryBuilder<Settings, bool, QQueryOperations> maleToiletsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'maleToilets');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showComputerPoolsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showComputerPools');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showDoorsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showDoors');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showElevatorsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showElevators');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showFoodAndDrinkProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showFoodAndDrink');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showIconsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showIcons');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showLectureHallsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showLectureHalls');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showSeminarRoomsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showSeminarRooms');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showStairsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showStairs');
});
}
QueryBuilder<Settings, bool, QQueryOperations> showToiletsProperty() {
return QueryBuilder.apply(this, (query) {
return query.addPropertyName(r'showToilets');
});
}
}

View File

@ -34,7 +34,9 @@ Result<Feature> parseFeature(
}
yaml = yaml as YamlMap? ?? {};
final description = yaml['desription'] as String?;
final description = yaml['description'] as String?;
// if (description != null) print("================ $description");
final building = yaml['building'] as String?;

View File

View File

@ -1,11 +1,18 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:uninav/controllers/isar_controller.dart';
import 'package:uninav/controllers/map_controller.dart';
import 'package:uninav/map.dart';
import 'package:uninav/settings.dart';
void main() {
// TODO: maybe make not async?
void main() async {
Get.put(MyMapController());
await Get.putAsync(() async {
final controller = IsarController();
await controller.initializeIsar();
return controller;
});
runApp(const MyApp());
}

View File

@ -127,27 +127,55 @@ class MapPage extends StatelessWidget {
),
padding:
const EdgeInsets.symmetric(horizontal: 8, vertical: 4),
child: Obx(
() => DropdownButton<int>(
value: Get.find<MyMapController>().currentLevel.value,
style: TextStyle(
color: Theme.of(context).colorScheme.onSurface),
dropdownColor: Theme.of(context).colorScheme.surface,
onChanged: (int? newValue) {
if (newValue != null) {
Get.find<MyMapController>().setLevel(newValue);
}
// Handle dropdown value change
},
items: Get.find<MyMapController>()
.levels
.map<DropdownMenuItem<int>>((int value) {
return DropdownMenuItem<int>(
value: value,
child: Text("Level $value"),
);
}).toList(),
),
child: Row(
children: [
Obx(
() => DropdownButton<int>(
value: Get.find<MyMapController>().currentLevel.value,
style: TextStyle(
color: Theme.of(context).colorScheme.onSurface),
dropdownColor: Theme.of(context).colorScheme.surface,
onChanged: (int? newValue) {
if (newValue != null) {
Get.find<MyMapController>().setLevel(newValue);
}
// Handle dropdown value change
},
items: Get.find<MyMapController>()
.levels
.map<DropdownMenuItem<int>>((int value) {
return DropdownMenuItem<int>(
value: value,
child: Text("Level $value"),
);
}).toList(),
),
),
IconButton(
icon: const Icon(Icons.arrow_upward),
onPressed: () {
int currentLevel =
Get.find<MyMapController>().currentLevel.value;
if (currentLevel <
Get.find<MyMapController>().levels.last) {
Get.find<MyMapController>()
.setLevel(currentLevel + 1);
}
},
),
IconButton(
icon: const Icon(Icons.arrow_downward),
onPressed: () {
int currentLevel =
Get.find<MyMapController>().currentLevel.value;
if (currentLevel >
Get.find<MyMapController>().levels.first) {
Get.find<MyMapController>()
.setLevel(currentLevel - 1);
}
},
),
],
),
)),
],

View File

@ -1,20 +1,171 @@
import 'package:flutter/material.dart';
import 'package:get/get.dart';
import 'package:uninav/components/drawer.dart';
import 'package:uninav/components/hamburger_menu.dart';
import 'package:uninav/controllers/isar_controller.dart';
class SettingsPage extends StatelessWidget {
const SettingsPage({super.key});
@override
Widget build(BuildContext context) {
final isarController = Get.find<IsarController>();
final settings = isarController.settings;
return Scaffold(
appBar: AppBar(
title: const Text('Settings'),
leading: HamburgerMenu(),
),
drawer: MyDrawer(),
body: const Center(
child: Text('TODO'),
body: SingleChildScrollView(
child: Column(
children: [
Obx(
() => Column(
children: [
SwitchListTile(
title: const Text('Show Icons'),
subtitle: const Text(
'Warning: disables ALL icons',
style: TextStyle(color: Colors.red, fontSize: 12),
),
value: settings.value.showIcons,
onChanged: (value) {
settings.update((val) {
val?.showIcons = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Elevators'),
value: settings.value.showElevators,
onChanged: (value) {
settings.update((val) {
val?.showElevators = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Food and Drink'),
value: settings.value.showFoodAndDrink,
onChanged: (value) {
settings.update((val) {
val?.showFoodAndDrink = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Lecture Halls'),
value: settings.value.showLectureHalls,
onChanged: (value) {
settings.update((val) {
val?.showLectureHalls = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Computer Pools'),
value: settings.value.showComputerPools,
onChanged: (value) {
settings.update((val) {
val?.showComputerPools = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Seminar Rooms'),
value: settings.value.showSeminarRooms,
onChanged: (value) {
settings.update((val) {
val?.showSeminarRooms = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Toilets'),
value: settings.value.showToilets,
onChanged: (value) {
settings.update((val) {
val?.showToilets = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Stairs'),
value: settings.value.showStairs,
onChanged: (value) {
settings.update((val) {
val?.showStairs = value;
});
isarController.persistSettings();
},
),
SwitchListTile(
title: const Text('Show Doors'),
value: settings.value.showDoors,
onChanged: (value) {
settings.update((val) {
val?.showDoors = value;
});
isarController.persistSettings();
},
),
const SizedBox(height: 12),
const Padding(
padding: EdgeInsets.only(left: 8.0),
child: Text('Toilet Preference'),
),
CheckboxListTile(
title: const Text('Male Toilets'),
value: settings.value.maleToilets,
onChanged: (value) {
settings.update((val) {
val?.maleToilets = value ?? false;
});
isarController.persistSettings();
},
),
CheckboxListTile(
title: const Text('Female Toilets'),
value: settings.value.femaleToilets,
onChanged: (value) {
settings.update((val) {
val?.femaleToilets = value ?? false;
});
isarController.persistSettings();
},
),
CheckboxListTile(
title: const Text('Handicap Toilets'),
value: settings.value.handicapToilets,
onChanged: (value) {
settings.update((val) {
val?.handicapToilets = value ?? false;
});
isarController.persistSettings();
},
),
const SizedBox(height: 12),
ElevatedButton(
onPressed: () {
settings.value = Settings();
isarController.persistSettings();
},
child: const Text("Reset Settings"),
),
],
),
),
],
),
),
);
}

View File

@ -1,3 +1,5 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:uninav/data/geo/model.dart';
String formatDuration(Duration duration) {
@ -65,3 +67,17 @@ String formatDistance(int distanceInMeters) {
}
}
}
IconData findToiletIcon(String type) {
switch (type.toLowerCase()) {
case 'male':
return Icons.male;
case 'female':
return Icons.female;
case 'handicap':
return Icons.accessible;
default:
print("WARN: Toilet didn't have recognizable type! Type was '$type'");
return Icons.wc;
}
}

View File

@ -6,9 +6,13 @@
#include "generated_plugin_registrant.h"
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <url_launcher_linux/url_launcher_plugin.h>
void fl_register_plugins(FlPluginRegistry* registry) {
g_autoptr(FlPluginRegistrar) isar_flutter_libs_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "IsarFlutterLibsPlugin");
isar_flutter_libs_plugin_register_with_registrar(isar_flutter_libs_registrar);
g_autoptr(FlPluginRegistrar) url_launcher_linux_registrar =
fl_plugin_registry_get_registrar_for_plugin(registry, "UrlLauncherPlugin");
url_launcher_plugin_register_with_registrar(url_launcher_linux_registrar);

View File

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
isar_flutter_libs
url_launcher_linux
)

View File

@ -5,8 +5,12 @@
import FlutterMacOS
import Foundation
import isar_flutter_libs
import path_provider_foundation
import url_launcher_macos
func RegisterGeneratedPlugins(registry: FlutterPluginRegistry) {
IsarFlutterLibsPlugin.register(with: registry.registrar(forPlugin: "IsarFlutterLibsPlugin"))
PathProviderPlugin.register(with: registry.registrar(forPlugin: "PathProviderPlugin"))
UrlLauncherPlugin.register(with: registry.registrar(forPlugin: "UrlLauncherPlugin"))
}

View File

@ -5,18 +5,18 @@ packages:
dependency: transitive
description:
name: _fe_analyzer_shared
sha256: "0b2f2bd91ba804e53a61d757b986f89f1f9eaed5b11e4b2f5a2468d86d6c9fc7"
sha256: ae92f5d747aee634b87f89d9946000c2de774be1d6ac3e58268224348cd0101a
url: "https://pub.dev"
source: hosted
version: "67.0.0"
version: "61.0.0"
analyzer:
dependency: transitive
description:
name: analyzer
sha256: "37577842a27e4338429a1cbc32679d508836510b056f1eedf0c8d20e39c1383d"
sha256: ea3d8652bda62982addfd92fdc2d0214e5f82e43325104990d4f4c4a2a313562
url: "https://pub.dev"
source: hosted
version: "6.4.1"
version: "5.13.0"
anim_search_bar:
dependency: "direct main"
description:
@ -197,10 +197,18 @@ packages:
dependency: transitive
description:
name: dart_style
sha256: "99e066ce75c89d6b29903d788a7bb9369cf754f7b24bf70bf4b6d6d6b26853b9"
sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55"
url: "https://pub.dev"
source: hosted
version: "2.3.6"
version: "2.3.2"
dartx:
dependency: transitive
description:
name: dartx
sha256: "8b25435617027257d43e6508b5fe061012880ddfdaa75a71d607c3de2a13d244"
url: "https://pub.dev"
source: hosted
version: "1.2.0"
fake_async:
dependency: transitive
description:
@ -209,6 +217,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.3.1"
ffi:
dependency: transitive
description:
name: ffi
sha256: "493f37e7df1804778ff3a53bd691d8692ddf69702cf4c1c1096a2e41b4779e21"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
file:
dependency: transitive
description:
@ -352,14 +368,38 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.0.4"
isar:
dependency: "direct main"
description:
name: isar
sha256: "99165dadb2cf2329d3140198363a7e7bff9bbd441871898a87e26914d25cf1ea"
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
isar_flutter_libs:
dependency: "direct main"
description:
name: isar_flutter_libs
sha256: bc6768cc4b9c61aabff77152e7f33b4b17d2fc93134f7af1c3dd51500fe8d5e8
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
isar_generator:
dependency: "direct dev"
description:
name: isar_generator
sha256: "76c121e1295a30423604f2f819bc255bc79f852f3bc8743a24017df6068ad133"
url: "https://pub.dev"
source: hosted
version: "3.1.0+1"
js:
dependency: transitive
description:
name: js
sha256: c1b2e9b5ea78c45e1a0788d29606ba27dc5f71f019f32ca5140f61ef071838cf
sha256: f2c445dce49627136094980615a031419f7f3eb393237e4ecd97ac15dea343f3
url: "https://pub.dev"
source: hosted
version: "0.7.1"
version: "0.6.7"
json_annotation:
dependency: "direct main"
description:
@ -496,6 +536,62 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.9.0"
path_provider:
dependency: "direct main"
description:
name: path_provider
sha256: c9e7d3a4cd1410877472158bee69963a4579f78b68c65a2b7d40d1a7a88bb161
url: "https://pub.dev"
source: hosted
version: "2.1.3"
path_provider_android:
dependency: transitive
description:
name: path_provider_android
sha256: a248d8146ee5983446bf03ed5ea8f6533129a12b11f12057ad1b4a67a2b3b41d
url: "https://pub.dev"
source: hosted
version: "2.2.4"
path_provider_foundation:
dependency: transitive
description:
name: path_provider_foundation
sha256: "5a7999be66e000916500be4f15a3633ebceb8302719b47b9cc49ce924125350f"
url: "https://pub.dev"
source: hosted
version: "2.3.2"
path_provider_linux:
dependency: transitive
description:
name: path_provider_linux
sha256: f7a1fe3a634fe7734c8d3f2766ad746ae2a2884abe22e241a8b301bf5cac3279
url: "https://pub.dev"
source: hosted
version: "2.2.1"
path_provider_platform_interface:
dependency: transitive
description:
name: path_provider_platform_interface
sha256: "88f5779f72ba699763fa3a3b06aa4bf6de76c8e5de842cf6f29e2e06476c2334"
url: "https://pub.dev"
source: hosted
version: "2.1.2"
path_provider_windows:
dependency: transitive
description:
name: path_provider_windows
sha256: "8bc9f22eee8690981c22aa7fc602f5c85b497a6fb2ceb35ee5a5e5ed85ad8170"
url: "https://pub.dev"
source: hosted
version: "2.2.1"
platform:
dependency: transitive
description:
name: platform
sha256: "12220bb4b65720483f8fa9450b4332347737cf8213dd2840d8b2c823e47243ec"
url: "https://pub.dev"
source: hosted
version: "3.1.4"
plugin_platform_interface:
dependency: transitive
description:
@ -661,6 +757,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.6.1"
time:
dependency: transitive
description:
name: time
sha256: ad8e018a6c9db36cb917a031853a1aae49467a93e0d464683e029537d848c221
url: "https://pub.dev"
source: hosted
version: "2.1.4"
timing:
dependency: transitive
description:
@ -797,6 +901,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.4.5"
win32:
dependency: transitive
description:
name: win32
sha256: "0a989dc7ca2bb51eac91e8fd00851297cfffd641aa7538b165c62637ca0eaa4a"
url: "https://pub.dev"
source: hosted
version: "5.4.0"
wkt_parser:
dependency: transitive
description:
@ -805,6 +917,22 @@ packages:
url: "https://pub.dev"
source: hosted
version: "2.0.0"
xdg_directories:
dependency: transitive
description:
name: xdg_directories
sha256: faea9dee56b520b55a566385b84f2e8de55e7496104adada9962e0bd11bcff1d
url: "https://pub.dev"
source: hosted
version: "1.0.4"
xxh3:
dependency: transitive
description:
name: xxh3
sha256: a92b30944a9aeb4e3d4f3c3d4ddb3c7816ca73475cd603682c4f8149690f56d7
url: "https://pub.dev"
source: hosted
version: "1.0.1"
yaml:
dependency: "direct main"
description:

View File

@ -50,6 +50,9 @@ dependencies:
json_annotation: ^4.8.1
rust_core: ^0.5.3
anyhow: ^1.3.0
isar: ^3.1.0+1
isar_flutter_libs: ^3.1.0+1
path_provider: ^2.1.3
dev_dependencies:
flutter_test:
@ -64,6 +67,7 @@ dev_dependencies:
build_runner: ^2.4.9
freezed: ^2.5.2
json_serializable: ^6.7.1
isar_generator: ^3.1.0+1
# For information on the generic Dart part of this file, see the
# following page: https://dart.dev/tools/pub/pubspec

View File

@ -6,9 +6,12 @@
#include "generated_plugin_registrant.h"
#include <isar_flutter_libs/isar_flutter_libs_plugin.h>
#include <url_launcher_windows/url_launcher_windows.h>
void RegisterPlugins(flutter::PluginRegistry* registry) {
IsarFlutterLibsPluginRegisterWithRegistrar(
registry->GetRegistrarForPlugin("IsarFlutterLibsPlugin"));
UrlLauncherWindowsRegisterWithRegistrar(
registry->GetRegistrarForPlugin("UrlLauncherWindows"));
}

View File

@ -3,6 +3,7 @@
#
list(APPEND FLUTTER_PLUGIN_LIST
isar_flutter_libs
url_launcher_windows
)