From 4f16cec26362b1f6f2fc77abd1279955c537c4a0 Mon Sep 17 00:00:00 2001 From: uvok Date: Fri, 1 Aug 2025 14:09:13 +0200 Subject: badgetemplate->motive --- lib/model/badge_motive.dart | 24 ++++++++++++++++++++++++ lib/model/badge_template.dart | 24 ------------------------ lib/widgets/badge_template_list.dart | 18 +++++++++--------- lib/widgets/device_details.dart | 2 +- 4 files changed, 34 insertions(+), 34 deletions(-) create mode 100644 lib/model/badge_motive.dart delete mode 100644 lib/model/badge_template.dart (limited to 'lib') diff --git a/lib/model/badge_motive.dart b/lib/model/badge_motive.dart new file mode 100644 index 0000000..0fd2039 --- /dev/null +++ b/lib/model/badge_motive.dart @@ -0,0 +1,24 @@ +// Copyright (C) 2025, uvok cheetah +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . + +class BadgeMotive { + final int id; + final String description; + + const BadgeMotive(this.id, this.description); + + @override + String toString() => "$id - $description"; +} diff --git a/lib/model/badge_template.dart b/lib/model/badge_template.dart deleted file mode 100644 index 2ca8aa6..0000000 --- a/lib/model/badge_template.dart +++ /dev/null @@ -1,24 +0,0 @@ -// Copyright (C) 2025, uvok cheetah -// -// This program is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// This program is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with this program. If not, see . - -class BadgeTemplate { - final int id; - final String description; - - const BadgeTemplate(this.id, this.description); - - @override - String toString() => "$id - $description"; -} diff --git a/lib/widgets/badge_template_list.dart b/lib/widgets/badge_template_list.dart index f9fa4b5..84cec76 100644 --- a/lib/widgets/badge_template_list.dart +++ b/lib/widgets/badge_template_list.dart @@ -14,23 +14,23 @@ // along with this program. If not, see . import 'package:flutter/material.dart'; -import 'package:uvok_epaper_badge/model/badge_template.dart'; +import 'package:uvok_epaper_badge/model/badge_motive.dart'; import 'package:uvok_epaper_badge/widgets/notifying_list_widget.dart'; -class BadgeTemplateList extends NotifyingListWidget { - BadgeTemplateList({super.key, required super.items}); +class BadgeMotiveList extends NotifyingListWidget { + BadgeMotiveList({super.key, required super.items}); - final List templates = [ - BadgeTemplate(0, "Foo"), - BadgeTemplate(1, "Bar"), - BadgeTemplate(2, "Baz"), + final List templates = [ + BadgeMotive(0, "Foo"), + BadgeMotive(1, "Bar"), + BadgeMotive(2, "Baz"), ]; @override - State createState() => _BadgeTemplateListState(); + State createState() => _BadgeMotiveListState(); } -class _BadgeTemplateListState extends State { +class _BadgeMotiveListState extends State { @override Widget build(BuildContext context) { return Expanded( diff --git a/lib/widgets/device_details.dart b/lib/widgets/device_details.dart index 789455e..1b6ecf0 100644 --- a/lib/widgets/device_details.dart +++ b/lib/widgets/device_details.dart @@ -71,7 +71,7 @@ class DeviceDetailsState extends State { children: [ SizedBox(height: 20), Text("Connection state: ${value.toString()}"), - BadgeTemplateList(items: []), + BadgeMotiveList(items: []), ], ); }, -- cgit v1.2.3