summaryrefslogtreecommitdiff
path: root/lib/view_model/badge_motive_view_model.dart
diff options
context:
space:
mode:
authoruvok2026-05-06 20:18:10 +0200
committeruvok2026-05-06 20:18:10 +0200
commit2a08a1e295647bc37a0ee5c17c24dcc812b02d48 (patch)
treed91f77a581c4fb6389fc10e83978ffc5ddfc4b89 /lib/view_model/badge_motive_view_model.dart
parent167f83e6fbfe1576b4e6392a4915294075a7a6fc (diff)
Add (QR) text sending to BMVM
Diffstat (limited to 'lib/view_model/badge_motive_view_model.dart')
-rw-r--r--lib/view_model/badge_motive_view_model.dart10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/view_model/badge_motive_view_model.dart b/lib/view_model/badge_motive_view_model.dart
index cf4bf27..9436e37 100644
--- a/lib/view_model/badge_motive_view_model.dart
+++ b/lib/view_model/badge_motive_view_model.dart
@@ -13,7 +13,7 @@
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <https://www.gnu.org/licenses/>.
-import 'package:flutter/foundation.dart';
+import 'package:flutter/widgets.dart';
import 'package:uvok_epaper_badge/log.dart';
import 'package:uvok_epaper_badge/model/badge_motive.dart';
import 'package:uvok_epaper_badge/model/motive_selection/badge_motive_selection.dart';
@@ -22,6 +22,7 @@ var logger = fileLogger();
class BadgeMotiveViewModel extends ChangeNotifier {
final BadgeMotiveSelection _motivSelect;
+ final TextEditingController qrCodeTextController = TextEditingController();
List<BadgeMotive> _motives = [];
bool _busy = false;
String? errorMessage;
@@ -33,6 +34,13 @@ class BadgeMotiveViewModel extends ChangeNotifier {
List<BadgeMotive> get motives => _motives;
BadgeMotive? currentMotive;
+ Future<void> sendText() async {
+ logger.i("Sending text: ${qrCodeTextController.text}");
+ await safeAction(() {
+ throw Exception("Not implemented");
+ });
+ }
+
Future<void> updateMotives() async {
await safeAction(() async {
_motives = await _motivSelect.getMotives();