mirror of
https://github.com/johrpan/musicus_mobile.git
synced 2025-10-26 18:57:25 +01:00
Add function to generate an ID
This commit is contained in:
parent
d18fd880ed
commit
d73f2075fa
1 changed files with 5 additions and 0 deletions
|
|
@ -1,7 +1,12 @@
|
|||
import 'dart:math';
|
||||
|
||||
import 'package:moor_flutter/moor_flutter.dart';
|
||||
|
||||
part 'database.g.dart';
|
||||
|
||||
final _random = Random(DateTime.now().millisecondsSinceEpoch);
|
||||
int generateId() => _random.nextInt(0xFFFFFFFF);
|
||||
|
||||
@UseMoor(
|
||||
include: {
|
||||
'database.moor',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue