From 2a08a1e295647bc37a0ee5c17c24dcc812b02d48 Mon Sep 17 00:00:00 2001 From: uvok Date: Wed, 6 May 2026 20:18:10 +0200 Subject: Add (QR) text sending to BMVM --- lib/view_model/badge_motive_view_model.dart | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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 . -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 _motives = []; bool _busy = false; String? errorMessage; @@ -33,6 +34,13 @@ class BadgeMotiveViewModel extends ChangeNotifier { List get motives => _motives; BadgeMotive? currentMotive; + Future sendText() async { + logger.i("Sending text: ${qrCodeTextController.text}"); + await safeAction(() { + throw Exception("Not implemented"); + }); + } + Future updateMotives() async { await safeAction(() async { _motives = await _motivSelect.getMotives(); -- cgit v1.2.3