forked from google/built_value.dart
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvalues.dart
44 lines (34 loc) · 1.24 KB
/
values.dart
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
// Copyright (c) 2017, Google Inc. Please see the AUTHORS file for details.
// All rights reserved. Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
library values;
import 'package:built_collection/built_collection.dart';
import 'package:built_value/built_value.dart';
part 'values.g.dart';
abstract class SimpleValue implements Built<SimpleValue, SimpleValueBuilder> {
int get anInt;
BuiltList<String> get list;
BuiltListMultimap<int, bool> get multimap;
BuiltMap<String, int> get map;
BuiltSet<int> get aSet;
BuiltSetMultimap<int, bool> get setMultimap;
factory SimpleValue([Function(SimpleValueBuilder) updates]) = _$SimpleValue;
SimpleValue._();
}
abstract class CompoundValue
implements Built<CompoundValue, CompoundValueBuilder> {
SimpleValue get simpleValue;
String? get string;
factory CompoundValue([Function(CompoundValueBuilder) updates]) =
_$CompoundValue;
CompoundValue._();
}
abstract class ComparedValue
implements Built<ComparedValue, ComparedValueBuilder> {
String get name;
@BuiltValueField(compare: false)
Function get onChanged;
factory ComparedValue([Function(ComparedValueBuilder) updates]) =
_$ComparedValue;
ComparedValue._();
}