Erweiterungen
This commit is contained in:
1 parent
5384964e3d
commit
3cc8ec47fc
7 files changed
+205
-7
No files matched your search
@@ -4,10 +4,12 @@ import 'package:intl/intl.dart';
|
||||
import 'package:isar/isar.dart';
|
||||
import 'package:kumi_popup_window/kumi_popup_window.dart';
|
||||
import 'package:stadtbote/main.dart';
|
||||
import 'package:stadtbote/model/accept_job_message.dart';
|
||||
import 'package:stadtbote/model/job.dart';
|
||||
import 'package:stadtbote/tools/constants.dart';
|
||||
import 'package:stadtbote/tools/util.dart';
|
||||
import 'package:badges/badges.dart' as badges;
|
||||
import 'package:uuid/uuid.dart';
|
||||
|
||||
void showAcceptJobsPopup(BuildContext context) async {
|
||||
var entries = await _createListEntries();
|
||||
@@ -142,11 +144,11 @@ Future<List<Widget>> _createListEntries() async {
|
||||
const SizedBox(height: 20),
|
||||
Row(children: [
|
||||
Expanded(
|
||||
child: getDefaultButton('Ablehnen', () => {_sendAnswer()}),
|
||||
child: getDefaultButton('Ablehnen', () => {_sendAnswer(1)}),
|
||||
),
|
||||
const SizedBox(width: 20),
|
||||
Expanded(
|
||||
child: getDefaultButton('Annehmen', () => {}),
|
||||
child: getDefaultButton('Annehmen', () => {_sendAnswer(2)}),
|
||||
)
|
||||
])
|
||||
],
|
||||
@@ -192,4 +194,14 @@ private void SendAnswer(int item)
|
||||
}
|
||||
*/
|
||||
|
||||
_sendAnswer() {}
|
||||
_sendAnswer(int item) {
|
||||
var answer = AcceptJobMessage();
|
||||
answer.reaction = Reaction();
|
||||
answer.reaction.id = Uuid().v4().toString();
|
||||
answer.reaction.track = Track();
|
||||
answer.reaction.track.time = DateTime.now().toUtc().toIso8601String();
|
||||
|
||||
var json = answer.toJson();
|
||||
|
||||
Util.logInfo('test');
|
||||
}
|
||||
Reference in new issue
Block a user