Delete old moor packages
|
@ -44,8 +44,6 @@ dev_dependencies:
|
|||
|
||||
|
||||
dependency_overrides:
|
||||
moor_generator:
|
||||
path: ../moor_generator
|
||||
drift:
|
||||
path: ../drift
|
||||
drift_dev:
|
||||
|
|
|
@ -12,8 +12,6 @@ class _VersionsBuilder extends Builder {
|
|||
@override
|
||||
Future<void> build(BuildStep buildStep) async {
|
||||
const packages = [
|
||||
'moor',
|
||||
'moor_generator',
|
||||
'sqlparser',
|
||||
'path',
|
||||
'build_runner',
|
||||
|
|
|
@ -2,14 +2,12 @@ import 'package:build/build.dart';
|
|||
import 'package:drift_dev/src/backends/build/drift_builder.dart';
|
||||
import 'package:drift_dev/src/backends/build/preprocess_builder.dart';
|
||||
|
||||
Builder driftBuilder(BuilderOptions options) =>
|
||||
DriftSharedPartBuilder(options, isForNewDriftPackage: true);
|
||||
Builder driftBuilder(BuilderOptions options) => DriftSharedPartBuilder(options);
|
||||
|
||||
Builder driftBuilderNotShared(BuilderOptions options) =>
|
||||
DriftPartBuilder(options, isForNewDriftPackage: true);
|
||||
DriftPartBuilder(options);
|
||||
|
||||
Builder preparingBuilder(BuilderOptions options) =>
|
||||
PreprocessBuilder(isForNewDriftPackage: true);
|
||||
Builder preparingBuilder(BuilderOptions options) => PreprocessBuilder();
|
||||
|
||||
PostProcessBuilder driftCleanup(BuilderOptions options) {
|
||||
return const FileDeletingBuilder(['.temp.dart']);
|
||||
|
|
|
@ -18,15 +18,9 @@ final _flags = Resource(() => _BuilderFlags());
|
|||
|
||||
mixin DriftBuilder on Builder {
|
||||
DriftOptions get options;
|
||||
bool get isForNewDriftPackage;
|
||||
|
||||
Writer createWriter() {
|
||||
return Writer(
|
||||
options,
|
||||
generationOptions: GenerationOptions(
|
||||
writeForMoorPackage: !isForNewDriftPackage,
|
||||
),
|
||||
);
|
||||
return Writer(options);
|
||||
}
|
||||
|
||||
Future<ParsedDartFile> analyzeDartFile(BuildStep step) async {
|
||||
|
@ -72,18 +66,13 @@ class DriftSharedPartBuilder extends SharedPartBuilder with DriftBuilder {
|
|||
@override
|
||||
final DriftOptions options;
|
||||
|
||||
@override
|
||||
final bool isForNewDriftPackage;
|
||||
|
||||
DriftSharedPartBuilder._(List<Generator> generators, String name,
|
||||
this.options, this.isForNewDriftPackage)
|
||||
DriftSharedPartBuilder._(
|
||||
List<Generator> generators, String name, this.options)
|
||||
: super(generators, name);
|
||||
|
||||
factory DriftSharedPartBuilder(BuilderOptions options,
|
||||
{bool isForNewDriftPackage = false}) {
|
||||
factory DriftSharedPartBuilder(BuilderOptions options) {
|
||||
return _createBuilder(options, (generators, parsedOptions) {
|
||||
return DriftSharedPartBuilder._(
|
||||
generators, 'moor', parsedOptions, isForNewDriftPackage);
|
||||
return DriftSharedPartBuilder._(generators, 'drift', parsedOptions);
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -93,7 +82,7 @@ class DriftSharedPartBuilder extends SharedPartBuilder with DriftBuilder {
|
|||
if (!flags.didWarnAboutDeprecatedOptions &&
|
||||
options.enabledDeprecatedOption) {
|
||||
print('You have the eagerly_load_dart_ast option enabled. The option is '
|
||||
'no longer necessary and will be removed in a future moor version. '
|
||||
'no longer necessary and will be removed in a future drift version. '
|
||||
'Consider removing the option from your build.yaml.');
|
||||
flags.didWarnAboutDeprecatedOptions = true;
|
||||
}
|
||||
|
@ -106,21 +95,12 @@ class DriftPartBuilder extends PartBuilder with DriftBuilder {
|
|||
@override
|
||||
final DriftOptions options;
|
||||
|
||||
@override
|
||||
final bool isForNewDriftPackage;
|
||||
|
||||
DriftPartBuilder._(List<Generator> generators, String extension, this.options,
|
||||
this.isForNewDriftPackage)
|
||||
DriftPartBuilder._(List<Generator> generators, String extension, this.options)
|
||||
: super(generators, extension);
|
||||
|
||||
factory DriftPartBuilder(BuilderOptions options,
|
||||
{bool isForNewDriftPackage = false}) {
|
||||
factory DriftPartBuilder(BuilderOptions options) {
|
||||
return _createBuilder(options, (generators, parsedOptions) {
|
||||
return DriftPartBuilder._(
|
||||
generators,
|
||||
isForNewDriftPackage ? '.drift.dart' : '.moor.dart',
|
||||
parsedOptions,
|
||||
isForNewDriftPackage);
|
||||
return DriftPartBuilder._(generators, '.drift.dart', parsedOptions);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,14 +26,12 @@ import 'package:sqlparser/sqlparser.dart';
|
|||
class PreprocessBuilder extends Builder {
|
||||
static const _outputs = ['.temp.dart', '.dart_in_drift'];
|
||||
|
||||
final bool isForNewDriftPackage;
|
||||
|
||||
PreprocessBuilder({this.isForNewDriftPackage = false});
|
||||
PreprocessBuilder();
|
||||
|
||||
@override
|
||||
late final Map<String, List<String>> buildExtensions = {
|
||||
'.moor': _outputs,
|
||||
if (isForNewDriftPackage) '.drift': _outputs
|
||||
'.drift': _outputs
|
||||
};
|
||||
|
||||
@override
|
||||
|
|
|
@ -42,8 +42,6 @@ class GenerateUtilsCommand extends Command {
|
|||
|
||||
@override
|
||||
Future<void> run() async {
|
||||
final isForMoor = argResults!.arguments.contains('moor_generator');
|
||||
|
||||
final rest = argResults!.rest;
|
||||
if (rest.length != 2) {
|
||||
usageException('Expected input and output directories');
|
||||
|
@ -71,11 +69,10 @@ class GenerateUtilsCommand extends Command {
|
|||
entities,
|
||||
argResults?['data-classes'] as bool,
|
||||
argResults?['companions'] as bool,
|
||||
isForMoor,
|
||||
);
|
||||
}
|
||||
|
||||
await _writeLibraryFile(outputDir, schema.keys, isForMoor);
|
||||
await _writeLibraryFile(outputDir, schema.keys);
|
||||
print(
|
||||
'Wrote ${schema.length + 1} files into ${p.relative(outputDir.path)}');
|
||||
}
|
||||
|
@ -106,7 +103,6 @@ class GenerateUtilsCommand extends Command {
|
|||
_ExportedSchema schema,
|
||||
bool dataClasses,
|
||||
bool companions,
|
||||
bool isForMoor,
|
||||
) {
|
||||
// let serialized options take precedence, otherwise use current options
|
||||
// from project.
|
||||
|
@ -121,20 +117,14 @@ class GenerateUtilsCommand extends Command {
|
|||
forSchema: version,
|
||||
writeCompanions: companions,
|
||||
writeDataClasses: dataClasses,
|
||||
writeForMoorPackage: isForMoor,
|
||||
),
|
||||
);
|
||||
final file = File(p.join(output.path, _filenameForVersion(version)));
|
||||
|
||||
final leaf = writer.leaf()
|
||||
writer.leaf()
|
||||
..writeln(_prefix)
|
||||
..writeln('//@dart=2.12');
|
||||
|
||||
if (isForMoor) {
|
||||
leaf.writeln("import 'package:moor/moor.dart';");
|
||||
} else {
|
||||
leaf.writeln("import 'package:drift/drift.dart';");
|
||||
}
|
||||
..writeln('//@dart=2.12')
|
||||
..writeln("import 'package:drift/drift.dart';");
|
||||
|
||||
final db = Database(
|
||||
declaredQueries: const [],
|
||||
|
@ -146,21 +136,12 @@ class GenerateUtilsCommand extends Command {
|
|||
return file.writeAsString(_dartfmt.format(writer.writeGenerated()));
|
||||
}
|
||||
|
||||
Future<void> _writeLibraryFile(
|
||||
Directory output, Iterable<int> versions, bool useMoorImports) {
|
||||
Future<void> _writeLibraryFile(Directory output, Iterable<int> versions) {
|
||||
final buffer = StringBuffer()
|
||||
..writeln(_prefix)
|
||||
..writeln('//@dart=2.12');
|
||||
|
||||
if (useMoorImports) {
|
||||
buffer
|
||||
..writeln("import 'package:moor/moor.dart';")
|
||||
..writeln("import 'package:moor_generator/api/migrations.dart';");
|
||||
} else {
|
||||
buffer
|
||||
..writeln("import 'package:drift/drift.dart';")
|
||||
..writeln("import 'package:drift_dev/api/migrations.dart';");
|
||||
}
|
||||
..writeln('//@dart=2.12')
|
||||
..writeln("import 'package:drift/drift.dart';")
|
||||
..writeln("import 'package:drift_dev/api/migrations.dart';");
|
||||
|
||||
for (final version in versions) {
|
||||
buffer.writeln("import '${_filenameForVersion(version)}' as v$version;");
|
||||
|
|
|
@ -18,10 +18,6 @@ class DataClassWriter {
|
|||
|
||||
String get serializerType => 'ValueSerializer?';
|
||||
|
||||
String get _runtimeOptions => scope.generationOptions.writeForMoorPackage
|
||||
? 'moorRuntimeOptions'
|
||||
: 'driftRuntimeOptions';
|
||||
|
||||
void write() {
|
||||
final parentClass = table.customParentClass ?? 'DataClass';
|
||||
_buffer.write('class ${table.dartTypeCode()} extends $parentClass ');
|
||||
|
@ -104,7 +100,7 @@ class DataClassWriter {
|
|||
..write('factory $dataClassName.fromJson('
|
||||
'Map<String, dynamic> json, {$serializerType serializer}'
|
||||
') {\n')
|
||||
..write('serializer ??= $_runtimeOptions.defaultSerializer;\n')
|
||||
..write('serializer ??= driftRuntimeOptions.defaultSerializer;\n')
|
||||
..write('return $dataClassName(');
|
||||
|
||||
for (final column in columns) {
|
||||
|
@ -143,7 +139,7 @@ class DataClassWriter {
|
|||
void _writeToJson() {
|
||||
_buffer.write('@override Map<String, dynamic> toJson('
|
||||
'{$serializerType serializer}) {\n'
|
||||
'serializer ??= $_runtimeOptions.defaultSerializer;\n'
|
||||
'serializer ??= driftRuntimeOptions.defaultSerializer;\n'
|
||||
'return <String, dynamic>{\n');
|
||||
|
||||
for (final column in columns) {
|
||||
|
|
|
@ -114,15 +114,10 @@ class GenerationOptions {
|
|||
/// Whether companions should be generated.
|
||||
final bool writeCompanions;
|
||||
|
||||
/// Whether we're generating code for the old moor package instead of the
|
||||
/// new `drift` package.
|
||||
final bool writeForMoorPackage;
|
||||
|
||||
const GenerationOptions({
|
||||
this.forSchema,
|
||||
this.writeDataClasses = true,
|
||||
this.writeCompanions = true,
|
||||
this.writeForMoorPackage = false,
|
||||
});
|
||||
|
||||
/// Whether, instead of generating the full database code, we're only
|
||||
|
|
|
@ -51,8 +51,6 @@ dev_dependencies:
|
|||
build_runner: ^2.0.0
|
||||
build_test: ^2.0.0
|
||||
json_serializable: ^6.2.0
|
||||
# Used to test the migration from moor to drift
|
||||
moor: any
|
||||
|
||||
executables:
|
||||
drift_dev:
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
dependency_overrides:
|
||||
drift:
|
||||
path: ../drift
|
||||
moor:
|
||||
path: ../moor
|
||||
sqlparser:
|
||||
path: ../sqlparser
|
||||
|
|
|
@ -34,15 +34,16 @@ Future<void> _setup(Iterable<d.Descriptor> lib,
|
|||
|
||||
final driftDevUrl =
|
||||
config.packages.singleWhere((e) => e.name == 'drift_dev').root;
|
||||
final moorFlutterUrl = driftDevUrl.resolve('../moor_flutter/');
|
||||
final moorUrl = driftDevUrl.resolve('../extras/assets/old_moor_package/');
|
||||
final moorFlutterUrl =
|
||||
driftDevUrl.resolve('../extras/assets/old_moor_flutter_package/');
|
||||
|
||||
final appUri = '${File(p.join(d.sandbox, 'app')).absolute.uri}/';
|
||||
final newConfig = PackageConfig([
|
||||
...config.packages,
|
||||
Package('app', Uri.parse(appUri),
|
||||
packageUriRoot: Uri.parse('${appUri}lib/')),
|
||||
// Need to fake moor_flutter because drift_dev can't depend on Flutter
|
||||
// packages
|
||||
Package('moor', moorUrl, packageUriRoot: Uri.parse('${moorUrl}lib/')),
|
||||
Package('moor_flutter', moorFlutterUrl,
|
||||
packageUriRoot: Uri.parse('${moorFlutterUrl}lib/')),
|
||||
]);
|
||||
|
|
|
@ -14,7 +14,7 @@ void main() {
|
|||
'generates const constructor for data classes can companion classes',
|
||||
() async {
|
||||
await testBuilder(
|
||||
DriftPartBuilder(const BuilderOptions({}), isForNewDriftPackage: true),
|
||||
DriftPartBuilder(const BuilderOptions({})),
|
||||
const {
|
||||
'a|lib/main.dart': r'''
|
||||
import 'package:drift/drift.dart';
|
||||
|
@ -47,7 +47,7 @@ class Database extends _$Database {}
|
|||
'generates async mapping code for existing row class with async factory',
|
||||
() async {
|
||||
await testBuilder(
|
||||
DriftPartBuilder(const BuilderOptions({}), isForNewDriftPackage: true),
|
||||
DriftPartBuilder(const BuilderOptions({})),
|
||||
const {
|
||||
'a|lib/main.dart': r'''
|
||||
import 'package:drift/drift.dart';
|
||||
|
|
|
@ -11,7 +11,7 @@ import 'package:test/test.dart';
|
|||
const _testInput = r'''
|
||||
import 'package:drift/drift.dart';
|
||||
|
||||
part 'main.moor.dart';
|
||||
part 'main.drift.dart';
|
||||
|
||||
class Users extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
|
@ -34,7 +34,7 @@ void main() {
|
|||
const {'a|lib/main.dart': _testInput},
|
||||
reader: await PackageAssetReader.currentIsolate(),
|
||||
outputs: const {
|
||||
'a|lib/main.moor.dart': _GeneratesWithoutFinalFields(
|
||||
'a|lib/main.drift.dart': _GeneratesWithoutFinalFields(
|
||||
{'User', 'UsersCompanion', 'SomeQueryResult'},
|
||||
),
|
||||
},
|
||||
|
|
|
@ -0,0 +1,5 @@
|
|||
This is a scaffold of the old `moor_flutter` package, roughly resembling the latest
|
||||
(and discontinued) version of `moor_flutter` on pub.dev.
|
||||
|
||||
This package is contained in this repository so that the migration from `moor`
|
||||
to `drift`, which is implemented in `drift_dev`, can still be tested.
|
|
@ -0,0 +1,20 @@
|
|||
name: moor_flutter
|
||||
description: Flutter implementation of moor, a safe and reactive persistence library for Dart applications
|
||||
version: 4.1.0
|
||||
repository: https://github.com/simolus3/drift
|
||||
homepage: https://drift.simonbinder.eu/
|
||||
issue_tracker: https://github.com/simolus3/drift/issues
|
||||
|
||||
environment:
|
||||
sdk: '>=2.12.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
moor: ^4.0.0
|
||||
sqflite: ^2.0.0+3
|
||||
path: ^1.8.0
|
||||
flutter:
|
||||
sdk: flutter
|
||||
|
||||
dev_dependencies:
|
||||
flutter_test:
|
||||
sdk: flutter
|
|
@ -0,0 +1,5 @@
|
|||
This is a scaffold of the old `moor` package, roughly resembling the latest
|
||||
(and discontinued) version of `moor` on pub.dev.
|
||||
|
||||
This package is contained in this repository so that the migration from `moor`
|
||||
to `drift`, which is implemented in `drift_dev`, can still be tested.
|
|
@ -16,24 +16,3 @@ dependencies:
|
|||
meta: ^1.3.0
|
||||
stream_channel: ^2.1.0
|
||||
sqlite3: ^1.0.0
|
||||
|
||||
dev_dependencies:
|
||||
build_test: ^2.0.0
|
||||
build_runner_core: ^7.0.0
|
||||
moor_generator: any
|
||||
uuid: ^3.0.0
|
||||
path: ^1.8.0
|
||||
build_runner: ^2.0.0
|
||||
test: ^1.17.0
|
||||
mockito: ^5.0.7
|
||||
rxdart: ^0.27.0
|
||||
|
||||
dependency_overrides:
|
||||
drift:
|
||||
path: ../drift
|
||||
drift_dev:
|
||||
path: ../drift_dev
|
||||
moor_generator:
|
||||
path: ../moor_generator
|
||||
sqlparser:
|
||||
path: ../sqlparser
|
|
@ -1,556 +0,0 @@
|
|||
## 4.6.1
|
||||
|
||||
- Fix the moor analyzer plugin not starting
|
||||
|
||||
Version 4.6.1+1 adds information about the name change to the README.
|
||||
|
||||
## 4.6.0
|
||||
|
||||
- Add `DoUpdate.withExcluded` to refer to the excluded row in an upsert clause.
|
||||
- Add optional `where` clause to `DoUpdate` constructors
|
||||
|
||||
### Important notice
|
||||
|
||||
Moor has been renamed to `drift`. This package will continue to be supported until the next major release (5.0.0),
|
||||
no immediate action is needed.
|
||||
|
||||
At the next breaking release, moor will be discontinued in favor of the `drift` package.
|
||||
Please consider migrating to `drift` at a suitable opportunity.
|
||||
Automated migration tooling exists! See https://drift.simonbinder.eu/name for details.
|
||||
|
||||
## 4.5.0
|
||||
|
||||
- Add `moorRuntimeOptions.debugPrint` option to control which `print` method is used by moor.
|
||||
- Add a `rowId` extension on generated tables.
|
||||
- Add `NullAwareTypeConverter` to simplify type converters that always map `null` from and to `null`.
|
||||
- Kill backing isolates after calling `MoorIsolate.shutdownAll`.
|
||||
|
||||
## 4.4.1
|
||||
|
||||
- Include latest generator in analyzer plugin
|
||||
|
||||
## 4.4.0
|
||||
|
||||
- Add `Value.ofNullable` constructor to easily wrap nullable values.
|
||||
- Support selecting views declared in a moor file in Dart (with `select`,
|
||||
`join` and similar methods)
|
||||
- Add the `scoped_dart_components` builder option to generate a function for
|
||||
[Dart components in SQL](https://drift.simonbinder.eu/docs/using-sql/moor_files/#dart-components-in-sql).
|
||||
The function's parameters reflect tables that are in scope.
|
||||
- Add the `UpsertMultiple` class to run multiple upsert clauses in an insert.
|
||||
This requires sqlite3 version 3.35 or later.
|
||||
- Add the `closeUnderlyingOnClose` argument to `VmDatabase.opened` as an option
|
||||
to keep the underlying instance opened when closing the `VmDatabase`.
|
||||
- The `tableUpdates` stream now emits the relevant updates instead of `null`.
|
||||
- Reflect type converters in generated columns. The `equalsValue` method can be used
|
||||
as an equals with a value mapped by a type converter.
|
||||
- Improve nullability analysis for SQL queries.
|
||||
- __Note__: You have to re-generate sources with `moor_generator` version 4.4.0 after
|
||||
upgrading to this version. Apologies for the inconvenience.
|
||||
|
||||
## 4.3.2
|
||||
|
||||
- Fix `insertReturning` not updating streams
|
||||
- Fix streams emitting stale data if a new subscriber attaches immediately
|
||||
after an update.
|
||||
|
||||
## 4.3.1
|
||||
|
||||
- Fix encoding table updates without a kind over isolates
|
||||
- Fix deserializing some nullable types in the default value serializer
|
||||
|
||||
## 4.3.0
|
||||
|
||||
- Support custom, existing classes for rows! See the `@UseRowClass` annotation
|
||||
for details.
|
||||
- Add `CASE WHEN` expressions with the `caseMatch` method on `Expression`
|
||||
- Add `insertReturning` which returns the generated row after an insert
|
||||
- Add `min`, `max` and `avg` functions for `DateTime` expressions
|
||||
- On supported platforms, cancel pending stream selects when the stream is disposed
|
||||
- `moor_flutter` is supported
|
||||
- `moor/ffi` is supported when used on a background isolate
|
||||
|
||||
## 4.2.1
|
||||
|
||||
- Deprecate `readBool`, `readString`, `readInt`, `readDouble`, `readDateTime`
|
||||
and `readBlob` in `QueryRow`.
|
||||
Use `read` directly (which supports nullable types).
|
||||
|
||||
## 4.2.0
|
||||
|
||||
- Fixed subqueries not affecting stream updates
|
||||
- Throw a `CouldNotRollBackException` when rolling back a transaction throws
|
||||
|
||||
## 4.1.0
|
||||
|
||||
- Reverted the `SelectableUtils` extension, its members have been added back to the
|
||||
`Selectable` class.
|
||||
- Add `trim()`, `trimLeft()` and `trimRight()` extensions for text expressions
|
||||
- Initial support for sub-queries in the Dart api:
|
||||
- `Expression.isInQuery` and `isNotInQuery` for `IS IN (SELECT ...)` matching
|
||||
- `subqueryExpression` to use single-column, single-row selects as values
|
||||
- `existsQuery` and `notExistsQuery` for `EXISTS` expressions
|
||||
- New `package:moor/remote.dart` library to access databases over any `StreamChannel`. The isolate library has been
|
||||
rewritten on top of that api.
|
||||
|
||||
## 4.0.0-nullsafety.1
|
||||
|
||||
- __Breaking__: `getSingle()` and `watchSingle()` are now non-nullable and throw for empty results.
|
||||
Use `getSingleOrNull()` and `watchSingleOrNull()` for the old behavior.
|
||||
- __Breaking__: Removed `QueryEngine`, its methods have been moved to `DatabaseConnectionUser`
|
||||
- __Breaking__: Changed the `args` parameter in `QueryExecutor` methods to `List<Object?>`
|
||||
- __Breaking__: Removed the second type parameter from `TypedResult.read`
|
||||
- __Breaking__: `TypedResult.read` and `TypedResult.readTable` now throw if the row does not contain the requested table
|
||||
or expression (they used to return `null`).
|
||||
- __Breaking__: `MoorWebStorage.indexedDbIfSupported` now returns a future
|
||||
- __Breaking__: `getSingle` and `watchSingle` (and their `orNull()` variants) are now an extension on `Selectable`.
|
||||
Import `package:moor/moor.dart` to files using those methods.
|
||||
- Support null safety
|
||||
- Changed the sql representation of text types from `VARCHAR` to `TEXT`
|
||||
- Added extensions for `isNull` and `isNotNull`
|
||||
- Support creating a `VmDatabase` from a raw sqlite3 `Database` via `VmDatabase.opened`
|
||||
- New `named_parameters` build option to generate named parameters for named variables in moor files
|
||||
- Added `Migrator.renameTable` to rename tables
|
||||
|
||||
## 3.4.0
|
||||
|
||||
- New `TableMigration` api to make complex table migrations easier. See the
|
||||
[updated documentation](https://drift.simonbinder.eu/docs/advanced-features/migrations/#complex-migrations) for details
|
||||
on how to use this feature.
|
||||
- New `DatabaseConnection.delayed` constructor to synchronously obtain a database connection that requires an async
|
||||
setup. This can be useful when connecting to a `MoorIsolate`.
|
||||
- `VmDatabase`: Create directory of database file to avoid misuse errors from sqlite3.
|
||||
- New feature in moor files: You can now set the default value for Dart templates:
|
||||
`filter ($predicate = TRUE): SELECT * FROM my_table WHERE $predicate`. This generates an optional named parameter in
|
||||
Dart.
|
||||
- New `generate_values_in_copy_with` [build option](https://drift.simonbinder.eu/docs/advanced-features/builder_options/)
|
||||
. It wraps nullable columns in a `Value` in `copyWith` methods so that they can be set to `null`.
|
||||
- Added `groupConcat`, `cast` and `coalesce` functions to the Dart query builder.
|
||||
- Added `renameColumn` to `Migrator` to generate `ALTER TABLE RENAME COLUMN` statements.
|
||||
- Added `VmDatabase.closeExistingInstances()` to close zombie database connections after hot restarts on some OSes.
|
||||
|
||||
## 3.3.1
|
||||
|
||||
- Support changing `onData` handlers for query streams. This fixes a bug occurring when using `queryStream.first`
|
||||
multiple times.
|
||||
|
||||
## 3.3.0
|
||||
|
||||
- New `package:moor/ffi.dart` library to replace the `moor_ffi` package. When migrating, Flutter users need to depend on
|
||||
the `sqlite3_flutter_libs` package as well. The changelog of `moor_ffi` contains further information about this
|
||||
- New (in
|
||||
generator): `apply_converters_on_variables` [build option](https://drift.simonbinder.eu/docs/advanced-features/builder_options/)
|
||||
. When enabled, type converter will be enabled on variables for analyzed queries. This will be the default option in
|
||||
the future.
|
||||
|
||||
## 3.2.0
|
||||
|
||||
- It's now possible to change the name of a class generated for moor-file queries. See
|
||||
[the documentation](https://drift.simonbinder.eu/docs/using-sql/moor_files/#result-class-names) for details.
|
||||
- Added the `multiLine`, `caseSensitive`, `unicode` and `doAll` flags to the `regex` sql extension method. They
|
||||
require `moor_ffi` version `0.7.0` or later.
|
||||
|
||||
## 3.1.0
|
||||
|
||||
- Update companions now implement `==` and `hashCode`
|
||||
- New `containsCase` method for text in `package:moor/extensions/moor_ffi.dart`
|
||||
- The `toCompanion` method is back for data classes, but its generation can be disabled with a build option
|
||||
- New
|
||||
feature: [Implicit enum converters](https://drift.simonbinder.eu/docs/advanced-features/type_converters/#implicit-enum-converters)
|
||||
- Added the `destructiveFallback` extension to databases. It can be used in `migrationStrategy` to delete and then
|
||||
re-create all tables, indices and triggers.
|
||||
|
||||
## 3.0.2
|
||||
|
||||
- Fix update statements not escaping column names ([#539](https://github.com/simolus3/drift/issues/539))
|
||||
|
||||
## 3.0.1
|
||||
|
||||
- Fix `mapFromRowOrNull` not working without a prefix ([#534](https://github.com/simolus3/drift/pull/534))
|
||||
|
||||
## 3.0.0
|
||||
|
||||
- __Breaking__: `package:moor/moor_web.dart` no longer exports `package:moor/moor.dart`. If you've relied on this,
|
||||
you'll now need to import `package:moor/moor.dart` as well.
|
||||
- __Breaking__: Remove deprecated members:
|
||||
- top-level `and`, `or` and `not` methods. Use `&`, `|` and `.not()` instead.
|
||||
- top-level `year`, `month`, `day`, `hour`, `minute`, `second` methods. Use the extension member
|
||||
on `Expression<DateTime>` instead.
|
||||
- `InsertStatement.insertAll` (use batches instead)
|
||||
- the `orReplace` boolean parameter on inserts (use `mode: InsertMode.orReplace` instead)
|
||||
- remove the top-level `isIn` and `isNotIn` functions
|
||||
(use the `.isIn` and `.isNotIn` instance methods instead)
|
||||
- `CustomSelectStatement.execute` and `constructFetcher` - use `get()` or `watch()`, respectively
|
||||
- __Breaking__: Remove the second type variable on `Expression` and subclasses.
|
||||
- __Breaking__: Remove `customSelectStream` from `QueryEngine`. The `customSelect`
|
||||
method now returns an `Selectable` (like `customSelectQuery`, which in turn has been deprecated).
|
||||
- __Breaking__: Columns that are aliases to sqlite's `rowid` column are no longer considered required for inserts
|
||||
- __Breaking__: Changes the way data classes and companions are inserted:
|
||||
- Removed `Insertable.toCompanion`
|
||||
- Added `Insertable.toColumns` to obtain a map from column names to values that should be inserted
|
||||
- Removed `TableInfo.entityToSql` - use `Insertable.toColumns` instead
|
||||
- __Breaking__: Renamed the `db` field in daos to `attachedDatabase`. The old field is available through an extension.
|
||||
- __Breaking__: The `compact_query_methods` and `use_column_name_as_json_key_when_defined_in_moor_file` build options
|
||||
are now enabled by default. This means that queries in moor files now generate a `Selectable` method by default (
|
||||
instead of two methods for `get` and `watch`). Columns defined in moor files will have their sql name as json key (
|
||||
moor used to transform their name to `camelCase`). You can still disable both options to keep the old behavior.
|
||||
- __Breaking__: The last statement in a moor file must now end with a semicolon as well
|
||||
- Batches now run statements in the order they were issued. This required a breaking change for engine implementers.
|
||||
- Experimentally support IndexedDB to store sqlite data on the web
|
||||
- Moor will no longer wait for query stream listeners to receive a done event when closing a database or transaction.
|
||||
- Updated stream queries: They now take triggers into account and more accurately detect when an update is necessary.
|
||||
- New `tableUpdates` method that can be used to listen for a subset of table updates outside of a query.
|
||||
- New feature: Nested results for compiled queries ([#288](https://github.com/simolus3/drift/issues/288))
|
||||
See the [documentation](https://drift.simonbinder.eu/docs/using-sql/moor_files/#nested-results) for details on how and
|
||||
when to use this feature.
|
||||
- New feature: Use sql expressions for inserts or updates with the new `custom` factory on companions
|
||||
- New feature: Upserts in the Dart api! Read everything you need to know
|
||||
[here](https://drift.simonbinder.eu/docs/getting-started/writing_queries/#upserts).
|
||||
- Support using `MoorIsolates` in scenarios where only primitive messages can be passed between isolates.
|
||||
|
||||
## 2.4.2
|
||||
|
||||
- Fix `beforeOpen` callback deadlocking when using the isolate executor
|
||||
([#431](https://github.com/simolus3/drift/issues/431))
|
||||
- Fix limit clause not being applied when using `.join` afterwards
|
||||
([#433](https://github.com/simolus3/drift/issues/433))
|
||||
|
||||
## 2.4.1
|
||||
|
||||
- Don't generate double quoted string literals in date time functions
|
||||
|
||||
## 2.4.0
|
||||
|
||||
- Support aggregate expressions and `group by` in the Dart api
|
||||
- Support type converters in moor files!
|
||||
The [documentation](https://drift.simonbinder.eu/docs/advanced-features/type_converters/)
|
||||
has been updated to explain how to use them.
|
||||
- Support stream queries in transactions ([#356](https://github.com/simolus3/drift/issues/365))
|
||||
- Support table-valued functions (like `json_each` and `json_tree`) in moor files
|
||||
[#260](https://github.com/simolus3/drift/issues/260).
|
||||
- Fix a crash when opening a transaction without using it ([#361](https://github.com/simolus3/drift/issues/361))
|
||||
- New `mapFromCompanion` method in generated tables to convert a `UpdateCompanion` to a model.
|
||||
- Support generated moor classes in other builders (like `built_value`).
|
||||
Details [in the docs](https://drift.simonbinder.eu/docs/advanced-features/builder_options/)
|
||||
|
||||
## 2.3.0
|
||||
|
||||
- New `clientDefault` method for columns. It can be used for dynamic defaults that might be different for each row. For
|
||||
instance, you can generate a uuid for each row with `text().clientDefault(() => Uuid().v4()();`
|
||||
- New CLI tool to analyze moor files: Learn more at [https://drift.simonbinder.eu/cli](https://drift.simonbinder.eu/cli)
|
||||
- Ability to override the default `ValueSerializer` globally by using `moorRuntimeOptions.valueSerializer`.
|
||||
- Moor files: You can now explicitly declare column types in those cases that the analyzer can't infer it:
|
||||
```
|
||||
selectVariable(:variable AS TEXT): SELECT :variable;
|
||||
```
|
||||
- Support for triggers and indices! You can declare them in a `.moor` file with a regular `CREATE TRIGGER`
|
||||
or `CREATE INDEX` statement. Both triggers and indices will be created in the default `onCreate` function. To create
|
||||
them in `onUpgrade`, use the new `createIndex` and `createTrigger` functions on a `Migrator`.
|
||||
- Support for moor-file queries that run on initialization ([#280](https://github.com/simolus3/drift/issues/280))
|
||||
Declare them like this `@create: INSERT INTO users VALUES ('default', 'user')`
|
||||
- Support deletes in batches ([#325](https://github.com/simolus3/drift/issues/325))
|
||||
- Reduce unnecessary queries when a stream is unsubscribed and then
|
||||
re-subscribed ([#329](https://github.com/simolus3/drift/issues/329))
|
||||
- Experimental new type inference for the sql analyzer. For details, check the
|
||||
`use_experimental_inference` [build option](https://drift.simonbinder.eu/docs/advanced-features/builder_options/)
|
||||
- Web: New `initializer` parameter to create the database when it doesn't exist
|
||||
|
||||
## 2.2.0
|
||||
|
||||
- Support custom expressions for selects in the Dart API:
|
||||
```dart
|
||||
final currentBalance = accounts.income - accounts.expenses;
|
||||
select(accounts).addColumns([currentBalance]).map((row) {
|
||||
Account account = row.readTable(accounts);
|
||||
int balanceOfAccount = row.read(currentBalance);
|
||||
return ...
|
||||
}).get();
|
||||
```
|
||||
- Support the `json1` and `fts5` extensions! Using them also requires version 2.2 of `moor_generator`
|
||||
and they require `moor_ffi`. For details, see
|
||||
the [documentation](https://drift.simonbinder.eu/docs/using-sql/extensions/).
|
||||
- Standardized behavior of batches in transactions across backends
|
||||
- Introduced `OrderingTerm.asc` and `OrderingTerm.desc` factories to construct ordering terms more easily
|
||||
|
||||
## 2.1.1
|
||||
|
||||
- Fix crash when closing a database with asserts disabled
|
||||
- Web: Save the database after migrations ran
|
||||
- Escape column names in insert statements, if necessary
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- New extension methods to simplify the Dart api!
|
||||
- Use `&`, `or` and `.not()` to combine boolean expressions.
|
||||
```dart
|
||||
// OLD
|
||||
select(animals)..where((a) => and(not(a.isMammal), a.amountOfLegs.equals(4)))
|
||||
// NEW:
|
||||
select(animals)..where((a) => a.isMammal.not() & a.amountOfLegs.equals(4))
|
||||
```
|
||||
- Arithmetic: New `+`, `-`, `*` and `/` operators for int and double sql expressions
|
||||
- New `+` operator for string concatenation
|
||||
- Fix crash when `customStatement` is the first operation used on a
|
||||
database ([#199](https://github.com/simolus3/drift/issues/199))
|
||||
- Allow transactions inside a `beforeOpen` callback
|
||||
- New `batch` method on generated databases to execute multiple queries in a single batch
|
||||
- Experimental support to run moor on a background isolate
|
||||
- Reduce use of parentheses in SQL code generated at runtime
|
||||
- Query streams now emit errors that happened while running the query
|
||||
- Upgraded the sql parser which now supports `WITH` clauses in moor files
|
||||
- Internal refactorings on the runtime query builder
|
||||
|
||||
## 2.0.1
|
||||
|
||||
- Introduced `isBetween` and `isBetweenValues` methods for comparable expressions (int, double, datetime)
|
||||
to check values for both an upper and lower bound
|
||||
- Automatically map `BOOLEAN` and `DATETIME` columns declared in a sql file to the appropriate type
|
||||
(both used to be `double` before).
|
||||
- Fix streams not emitting cached data when listening multiple times
|
||||
- __Breaking__: Remove the type parameter from `Insertable.createCompanion` (it was declared as an internal method)
|
||||
|
||||
__2.0.1+1__: Fix crash when `customStatement` is the first operation used on a database
|
||||
([#199](https://github.com/simolus3/drift/issues/199))
|
||||
|
||||
## 2.0.0
|
||||
|
||||
This is the first major update after the initial release and moor and we have a lot to cover:
|
||||
`.moor` files can now have their own imports and queries, you can embed Dart in sql queries using the new templates
|
||||
feature and we have a prototype of a pure-Dart SQL IDE ready. Finally, we also removed a variety of deprecated features.
|
||||
See the breaking changes section to learn what components are affected and what alternatives are available.
|
||||
|
||||
### New features
|
||||
|
||||
#### Updates to the sql parser
|
||||
|
||||
`.moor` files were introduced in moor 1.7 as an experimental way to declare tables by using
|
||||
`CREATE TABLE` statements. In this version, they become stable and support their own import and query system. This
|
||||
allows you to write queries in their own file:
|
||||
|
||||
```sql
|
||||
CREATE TABLE users
|
||||
(
|
||||
id INT NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
name VARCHAR NOT NULL
|
||||
);
|
||||
|
||||
findByName
|
||||
:
|
||||
SELECT *
|
||||
FROM users
|
||||
WHERE name LIKE :query;
|
||||
```
|
||||
|
||||
When this file is included from a `@UseMoor` annotation, moor will generate methods to run the query. Of course, you can
|
||||
also write Dart queries for tables declared in sql:
|
||||
|
||||
```dart
|
||||
Stream<User> loadUserById(int id) {
|
||||
return (select(users)
|
||||
..where((u) => u.id.equals(2))).watchSingle();
|
||||
}
|
||||
```
|
||||
|
||||
Moor files can also import other moor files by using an `import 'other.moor';` statement at the top. Then, all tables
|
||||
defined in `other.moor` will also be available to the current file.
|
||||
|
||||
Moor takes Dart and SQL interop even further with the new "Dart in SQL templates". You can define a query like this:
|
||||
|
||||
```sql
|
||||
findDynamic
|
||||
:
|
||||
SELECT *
|
||||
FROM users
|
||||
WHERE $condition;
|
||||
```
|
||||
|
||||
And moor will generate a method `findDynamic(Expression<bool, BoolType> condition)` for you. This allows you to bind the
|
||||
template with a predicate as complex as you'd like. At the moment, Dart templates are supported for
|
||||
expressions, `OrderBy`, `OrderingTerm` and `Limit`.
|
||||
|
||||
`INSERT` statements can now be used as a compiled statement - both in moor files and in a `@UseMoor` or `@UseDao`
|
||||
annotation. A new builtin linter will even warn you when you forget to provide a value for a non-nullable column - right
|
||||
at compile time!
|
||||
|
||||
And finally, we now generate better query code when queries only return a single column. Instead of generating a whole
|
||||
new class for that, we simply return the value directly.
|
||||
|
||||
#### Experimental ffi support
|
||||
|
||||
We released an experimental version of moor built on top of `dart:ffi`. It works cross-platform and is much, much faster
|
||||
than `moor_flutter`. It you want to try it out, read the docs [here](https://drift.simonbinder.eu/docs/other-engines/vm/)
|
||||
.
|
||||
|
||||
### Minor changes
|
||||
|
||||
- a `Constant<String>` can now be written to SQL, it used to throw before. This is useful if you need default values for
|
||||
strings columns. This also works for `BLOBS`
|
||||
(`Constant<Uint8List>`).
|
||||
- new `LazyDatabase` for when you want to construct a database asynchronously (for instance, if you first need to find a
|
||||
file before you can open a database).
|
||||
|
||||
### Breaking changes
|
||||
|
||||
- __THIS LIKELY AFFECTS YOUR APP:__ Removed the `transaction` parameter for callbacks in transactions and `beforeOpen`
|
||||
callbacks. So, instead of writing
|
||||
```dart
|
||||
transaction((t) async {
|
||||
await t.update(table)...;
|
||||
});
|
||||
```
|
||||
simply write
|
||||
```dart
|
||||
transaction(() async {
|
||||
await update(table)...;
|
||||
});
|
||||
```
|
||||
Similarly, instead of using `onOpen: (db, details) async {...}`, use
|
||||
`onOpen: (details) async {...}`. You don't have to worry about calling methods on your database instead of a
|
||||
transaction objects. They will be delegated automatically.
|
||||
|
||||
On a similar note, we also removed the `operateOn` parameter from compiled queries.
|
||||
- Compiled queries that return only a single column (e.g. `SELECT COUNT(*) FROM users`)
|
||||
will just return their value (in this case, an `int`) now. Moor no longer generates a new class in that case.
|
||||
- Removed `MigrationStrategy.onFinished`. Use `beforeOpen` instead.
|
||||
- Compiled sql queries starting with an underscore will now generate private match queries. Previously, the
|
||||
query `_allUsers` would generate a `watchAllUsers` method, that has been adopted to `_watchAllUsers`.
|
||||
The `generate_private_watch_methods` builder option, which backported this fix to older versions, has thus been
|
||||
removed.
|
||||
- Removed `InsertStatement.insertOrReplace`. Use `insert(data, orReplace: true)` instead.
|
||||
- Removed the diff util and `MoorAnimatedList`. Use a third party library for that.
|
||||
|
||||
## 1.7.2
|
||||
|
||||
- Fixed a race condition that caused the database to be opened multiple times on slower devices. This problem was
|
||||
introduced in `1.7.0` and was causing problems during migrations.
|
||||
|
||||
## 1.7.1
|
||||
|
||||
- Better documentation on `getSingle` and `watchSingle` for queries.
|
||||
- Fix `INTEGER NOT NULL PRIMARY KEY` wrongly requiring a value during insert (this never affected
|
||||
`AUTOINCREMENT` columns, and only affects columns declared in a `.moor` file)
|
||||
|
||||
## 1.7.0
|
||||
|
||||
- Support custom columns via type converters. See the [docs](https://drift.simonbinder.eu/type_converters)
|
||||
for details on how to use this feature.
|
||||
- Transactions now roll back when not completed successfully, they also rethrow the exception to make debugging easier.
|
||||
- New `backends` api, making it easier to write database drivers that work with moor. Apart from
|
||||
`moor_flutter`, new experimental backends can be checked out from git:
|
||||
1. `encrypted_moor`: An encrypted moor database: https://github.com/simolus3/drift/tree/develop/extras/encryption
|
||||
- The compiled sql feature is no longer experimental and will stay stable until a major version bump
|
||||
- New, experimental support for `.moor` files! Instead of declaring your tables in Dart, you can choose to declare them
|
||||
with sql by writing the `CREATE TABLE` statement in a `.moor` file. You can then use these tables in the database and
|
||||
with daos by using the `include` parameter on `@UseMoor` and `@UseDao`. Again, please notice that this is an
|
||||
experimental api and there might be some hiccups. Please report any issues you run into.
|
||||
|
||||
## 1.6.0
|
||||
|
||||
- Experimental web support! See [the documentation](https://drift.simonbinder.eu/web) for details.
|
||||
- Make transactions easier to use: Thanks to some Dart async magic, you no longer need to run queries on the transaction
|
||||
explicitly. This
|
||||
```dart
|
||||
Future deleteCategory(Category category) {
|
||||
return transaction((t) async {
|
||||
await t.delete(categories).delete(category);
|
||||
});
|
||||
}
|
||||
```
|
||||
is now the same as this (notice how we don't have to use the `t.` in front of the delete)
|
||||
```dart
|
||||
Future deleteCategory(Category category) {
|
||||
return transaction((t) async {
|
||||
await delete(categories).delete(category);
|
||||
});
|
||||
}
|
||||
```
|
||||
This makes it much easier to compose operations by extracting them into methods, as you don't have to worry about not
|
||||
using the `t` parameter.
|
||||
- Moor now provides syntax sugar for list parameters in compiled custom queries
|
||||
(`SELECT * FROM entries WHERE id IN ?`)
|
||||
- Support `COLLATE` expressions.
|
||||
- Date time columns are now comparable
|
||||
- The `StringType` now supports arbitrary data from sqlite ([#70](https://github.com/simolus3/drift/pull/70)).
|
||||
Thanks, [knaeckeKami](https://github.com/knaeckeKami)!
|
||||
- Bugfixes related to stream queries and `LIMIT` clauses.
|
||||
|
||||
## 1.5.1
|
||||
|
||||
- Fixed an issue where transformed streams would not always update
|
||||
- Emit a `INSERT INTO table DEFAULT VALUES` when appropriate. Moor used to generate invalid sql before.
|
||||
|
||||
## 1.5.0
|
||||
|
||||
This version introduces some new concepts and features, which are explained in more detail below. Here is a quick
|
||||
overview of the new features:
|
||||
|
||||
- More consistent and reliable callbacks for migrations. You can now use `MigrationStrategy.beforeOpen`
|
||||
to run queries after migrations, but before fully opening the database. This is useful to initialize data.
|
||||
- Greatly expanded documentation, introduced additional checks to provide more helpful error messages
|
||||
- New `getSingle` and `watchSingle` methods on queries: Queries that you know will only return one row can now be
|
||||
instructed to return the value directly instead of wrapping it in a list.
|
||||
- New "update companion" classes to clearly separate between absent values and explicitly setting values back to null -
|
||||
explained below.
|
||||
- Experimental support for compiled sql queries: __Moor can now generate typesafe APIs for written sql__. Read on to get
|
||||
started.
|
||||
|
||||
### Update companions
|
||||
|
||||
Newly introduced "Update companions" allow you to insert or update data more precisely than before. Previously, there
|
||||
was no clear separation between "null" and absent values. For instance, let's say we had a table "users" that stores an
|
||||
id, a name, and an age. Now, let's say we wanted to set the age of a user to null without changing its name. Would we
|
||||
use `User(age: null)`? Here, the `name` column would implicitly be set to null, so we can't cleanly separate that.
|
||||
However, with `UsersCompanion(age: Value(null))`, we know the difference between `Value(null)` and the
|
||||
default `Value.absent()`.
|
||||
|
||||
Don't worry, all your existing code will continue to work, this change is fully backwards compatible. You might get
|
||||
analyzer warnings about missing required fields. The migration to update companions will fix that. Replacing normal
|
||||
classes with their update companions is simple and the only thing needed to fix that.
|
||||
The [documentation](https://drift.simonbinder.eu/queries/#updates-and-deletes)
|
||||
has been updated to reflect this. If you have additional questions, feel free to
|
||||
[create an issue](https://github.com/simolus3/drift/issues/new).
|
||||
|
||||
### Compiled sql queries
|
||||
|
||||
Experimental support for compile time custom statements. Sounds super boring, but it actually gives you a fluent way to
|
||||
write queries in pure sql. The moor generator will figure out what your queries return and automatically generate the
|
||||
boring mapping part. Head on to
|
||||
[the documentation](https://drift.simonbinder.eu/queries/custom) to find out how to use this new feature.
|
||||
|
||||
Please note that this feature is in an experimental state: Expect minor, but breaking changes in the API and in the
|
||||
generated code. Also, if you run into any issues with this feature,
|
||||
[reporting them](https://github.com/simolus3/drift/issues/new) would be super appreciated.
|
||||
|
||||
## 1.4.0
|
||||
|
||||
- Added the `RealColumn`, which stores floating point values
|
||||
- Better configuration for the serializer with the `JsonKey` annotation and the ability to use a
|
||||
custom `ValueSerializer`
|
||||
|
||||
## 1.3.0
|
||||
|
||||
- Moor now supports table joins
|
||||
- Added table aliases
|
||||
- Default values for columns: Just use the `withDefault` method when declaring a column
|
||||
- added expressions that resolve to the current date or time
|
||||
- Fixed a crash that would occur if the first operation was a transaction
|
||||
- Better support for custom expressions as part of a regular query
|
||||
- Faster hashcode implementation in generated data classes
|
||||
|
||||
## 1.2.0
|
||||
|
||||
- __Breaking__: Generated DAO classes are now called `_$YourNameHere`, it used to be just `_YourNameHere` (without the
|
||||
dollar sign)
|
||||
- Blob data type
|
||||
- `insertOrReplace` method for insert statements
|
||||
- DAOs can now operate on transactions
|
||||
- Custom constraints
|
||||
- Query streams are now cached so that equal queries yield identical streams. This can improve performance.
|
||||
|
||||
## 1.1.0
|
||||
|
||||
- Transactions
|
||||
|
||||
## 1.0.0
|
||||
|
||||
- Initial version of the Moor library
|
21
moor/LICENSE
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Simon Binder
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,22 +0,0 @@
|
|||
# Moor
|
||||
|
||||
__Important notice__: Moor has been renamed to Drift.
|
||||
This package will continue to be supported for a while, but we encourage users to migrate to `drift`.
|
||||
Automated tooling to help you make the switch is available! For more information, see [the documentation](https://drift.simonbinder.eu/name/).
|
||||
Thank you for understanding!
|
||||
|
||||
__To start using Drift, read our detailed [docs](https://drift.simonbinder.eu/docs/getting-started/).__
|
||||
|
||||
## Proudly Sponsored by [Stream 💙](https://getstream.io/chat/sdk/android/?utm_source=Moor&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Moor_July2022_AndroidChatSDK_klmh22)
|
||||
|
||||
<p align="center">
|
||||
<table>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td align="center">
|
||||
<a href="https://getstream.io/chat/sdk/android/?utm_source=Moor&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Moor_July2022_AndroidChatSDK_klmh22" target="_blank"><img width="250px" src="https://stream-blog.s3.amazonaws.com/blog/wp-content/uploads/fc148f0fc75d02841d017bb36e14e388/Stream-logo-with-background-.png"/></a><br/><span><a href="https://getstream.io/chat/sdk/android/?utm_source=Moor&utm_medium=Github_Repo_Content_Ad&utm_content=Developer&utm_campaign=Moor_July2022_AndroidChatSDK_klmh22" target="_blank">Try the Flutter Chat Tutorial  💬</a></span>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</p>
|
|
@ -1,10 +0,0 @@
|
|||
#include: ../analysis_options.yaml
|
||||
|
||||
analyzer:
|
||||
errors:
|
||||
public_member_api_docs: warning
|
||||
deprecated_member_use_from_same_package: ignore
|
||||
exclude:
|
||||
- "example_web/**"
|
||||
- "**/*.g.dart"
|
||||
- "**/*.mocks.dart"
|
|
@ -1,21 +0,0 @@
|
|||
targets:
|
||||
$default:
|
||||
builders:
|
||||
moor_generator:
|
||||
options:
|
||||
override_hash_and_equals_in_result_sets: true
|
||||
use_column_name_as_json_key_when_defined_in_moor_file: true
|
||||
generate_connect_constructor: true
|
||||
compact_query_methods: true
|
||||
write_from_json_string_constructor: true
|
||||
raw_result_set_data: true
|
||||
apply_converters_on_variables: true
|
||||
generate_values_in_copy_with: true
|
||||
named_parameters: true
|
||||
new_sql_code_generation: true
|
||||
scoped_dart_components: true
|
||||
sqlite:
|
||||
version: "3.35"
|
||||
modules:
|
||||
- json1
|
||||
- fts5
|
|
@ -1,69 +0,0 @@
|
|||
import 'package:moor/moor.dart';
|
||||
|
||||
part 'example.g.dart';
|
||||
|
||||
// Define tables that can model a database of recipes.
|
||||
|
||||
@DataClassName('Category')
|
||||
class Categories extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get description => text().nullable()();
|
||||
}
|
||||
|
||||
class Recipes extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get title => text().withLength(max: 16)();
|
||||
TextColumn get instructions => text()();
|
||||
IntColumn get category => integer().nullable()();
|
||||
}
|
||||
|
||||
class Ingredients extends Table {
|
||||
IntColumn get id => integer().autoIncrement()();
|
||||
TextColumn get name => text()();
|
||||
IntColumn get caloriesPer100g => integer().named('calories')();
|
||||
}
|
||||
|
||||
class IngredientInRecipes extends Table {
|
||||
@override
|
||||
String get tableName => 'recipe_ingredients';
|
||||
|
||||
// We can also specify custom primary keys
|
||||
@override
|
||||
Set<Column> get primaryKey => {recipe, ingredient};
|
||||
|
||||
IntColumn get recipe => integer()();
|
||||
IntColumn get ingredient => integer()();
|
||||
|
||||
IntColumn get amountInGrams => integer().named('amount')();
|
||||
}
|
||||
|
||||
@UseMoor(
|
||||
tables: [Categories, Recipes, Ingredients, IngredientInRecipes],
|
||||
queries: {
|
||||
// query to load the total weight for each recipe by loading all ingredients
|
||||
// and taking the sum of their amountInGrams.
|
||||
'totalWeight': '''
|
||||
SELECT r.title, SUM(ir.amount) AS total_weight
|
||||
FROM recipes r
|
||||
INNER JOIN recipe_ingredients ir ON ir.recipe = r.id
|
||||
GROUP BY r.id
|
||||
'''
|
||||
},
|
||||
)
|
||||
class Database extends _$Database {
|
||||
Database(QueryExecutor e) : super(e);
|
||||
|
||||
@override
|
||||
int get schemaVersion => 1;
|
||||
|
||||
@override
|
||||
MigrationStrategy get migration {
|
||||
return MigrationStrategy(
|
||||
beforeOpen: (details) async {
|
||||
// populate data
|
||||
await into(categories)
|
||||
.insert(const CategoriesCompanion(description: Value('Sweets')));
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
|
@ -1,938 +0,0 @@
|
|||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'example.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// MoorGenerator
|
||||
// **************************************************************************
|
||||
|
||||
// ignore_for_file: unnecessary_brace_in_string_interps, unnecessary_this
|
||||
class Category extends DataClass implements Insertable<Category> {
|
||||
final int id;
|
||||
final String? description;
|
||||
Category({required this.id, this.description});
|
||||
factory Category.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
||||
{String? prefix}) {
|
||||
final effectivePrefix = prefix ?? '';
|
||||
return Category(
|
||||
id: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||
description: const StringType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}description']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['id'] = Variable<int>(id);
|
||||
if (!nullToAbsent || description != null) {
|
||||
map['description'] = Variable<String?>(description);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
CategoriesCompanion toCompanion(bool nullToAbsent) {
|
||||
return CategoriesCompanion(
|
||||
id: Value(id),
|
||||
description: description == null && nullToAbsent
|
||||
? const Value.absent()
|
||||
: Value(description),
|
||||
);
|
||||
}
|
||||
|
||||
factory Category.fromJson(Map<String, dynamic> json,
|
||||
{ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return Category(
|
||||
id: serializer.fromJson<int>(json['id']),
|
||||
description: serializer.fromJson<String?>(json['description']),
|
||||
);
|
||||
}
|
||||
factory Category.fromJsonString(String encodedJson,
|
||||
{ValueSerializer? serializer}) =>
|
||||
Category.fromJson(
|
||||
DataClass.parseJson(encodedJson) as Map<String, dynamic>,
|
||||
serializer: serializer);
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'id': serializer.toJson<int>(id),
|
||||
'description': serializer.toJson<String?>(description),
|
||||
};
|
||||
}
|
||||
|
||||
Category copyWith(
|
||||
{int? id, Value<String?> description = const Value.absent()}) =>
|
||||
Category(
|
||||
id: id ?? this.id,
|
||||
description: description.present ? description.value : this.description,
|
||||
);
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('Category(')
|
||||
..write('id: $id, ')
|
||||
..write('description: $description')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(id, description);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is Category &&
|
||||
other.id == this.id &&
|
||||
other.description == this.description);
|
||||
}
|
||||
|
||||
class CategoriesCompanion extends UpdateCompanion<Category> {
|
||||
final Value<int> id;
|
||||
final Value<String?> description;
|
||||
const CategoriesCompanion({
|
||||
this.id = const Value.absent(),
|
||||
this.description = const Value.absent(),
|
||||
});
|
||||
CategoriesCompanion.insert({
|
||||
this.id = const Value.absent(),
|
||||
this.description = const Value.absent(),
|
||||
});
|
||||
static Insertable<Category> custom({
|
||||
Expression<int>? id,
|
||||
Expression<String>? description,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (id != null) 'id': id,
|
||||
if (description != null) 'description': description,
|
||||
});
|
||||
}
|
||||
|
||||
CategoriesCompanion copyWith({Value<int>? id, Value<String?>? description}) {
|
||||
return CategoriesCompanion(
|
||||
id: id ?? this.id,
|
||||
description: description ?? this.description,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
if (id.present) {
|
||||
map['id'] = Variable<int>(id.value);
|
||||
}
|
||||
if (description.present) {
|
||||
map['description'] = Variable<String?>(description.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('CategoriesCompanion(')
|
||||
..write('id: $id, ')
|
||||
..write('description: $description')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $CategoriesTable extends Categories
|
||||
with TableInfo<$CategoriesTable, Category> {
|
||||
final GeneratedDatabase _db;
|
||||
final String? _alias;
|
||||
$CategoriesTable(this._db, [this._alias]);
|
||||
final VerificationMeta _idMeta = const VerificationMeta('id');
|
||||
late final GeneratedColumn<int?> id = GeneratedColumn<int?>(
|
||||
'id', aliasedName, false,
|
||||
typeName: 'INTEGER',
|
||||
requiredDuringInsert: false,
|
||||
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
|
||||
final VerificationMeta _descriptionMeta =
|
||||
const VerificationMeta('description');
|
||||
late final GeneratedColumn<String?> description = GeneratedColumn<String?>(
|
||||
'description', aliasedName, true,
|
||||
typeName: 'TEXT', requiredDuringInsert: false);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [id, description];
|
||||
@override
|
||||
String get aliasedName => _alias ?? 'categories';
|
||||
@override
|
||||
String get actualTableName => 'categories';
|
||||
@override
|
||||
VerificationContext validateIntegrity(Insertable<Category> instance,
|
||||
{bool isInserting = false}) {
|
||||
final context = VerificationContext();
|
||||
final data = instance.toColumns(true);
|
||||
if (data.containsKey('id')) {
|
||||
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
||||
}
|
||||
if (data.containsKey('description')) {
|
||||
context.handle(
|
||||
_descriptionMeta,
|
||||
description.isAcceptableOrUnknown(
|
||||
data['description']!, _descriptionMeta));
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@override
|
||||
Set<GeneratedColumn> get $primaryKey => {id};
|
||||
@override
|
||||
Category map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
return Category.fromData(data, _db,
|
||||
prefix: tablePrefix != null ? '$tablePrefix.' : null);
|
||||
}
|
||||
|
||||
@override
|
||||
$CategoriesTable createAlias(String alias) {
|
||||
return $CategoriesTable(_db, alias);
|
||||
}
|
||||
}
|
||||
|
||||
class Recipe extends DataClass implements Insertable<Recipe> {
|
||||
final int id;
|
||||
final String title;
|
||||
final String instructions;
|
||||
final int? category;
|
||||
Recipe(
|
||||
{required this.id,
|
||||
required this.title,
|
||||
required this.instructions,
|
||||
this.category});
|
||||
factory Recipe.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
||||
{String? prefix}) {
|
||||
final effectivePrefix = prefix ?? '';
|
||||
return Recipe(
|
||||
id: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||
title: const StringType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}title'])!,
|
||||
instructions: const StringType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}instructions'])!,
|
||||
category: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}category']),
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['id'] = Variable<int>(id);
|
||||
map['title'] = Variable<String>(title);
|
||||
map['instructions'] = Variable<String>(instructions);
|
||||
if (!nullToAbsent || category != null) {
|
||||
map['category'] = Variable<int?>(category);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
RecipesCompanion toCompanion(bool nullToAbsent) {
|
||||
return RecipesCompanion(
|
||||
id: Value(id),
|
||||
title: Value(title),
|
||||
instructions: Value(instructions),
|
||||
category: category == null && nullToAbsent
|
||||
? const Value.absent()
|
||||
: Value(category),
|
||||
);
|
||||
}
|
||||
|
||||
factory Recipe.fromJson(Map<String, dynamic> json,
|
||||
{ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return Recipe(
|
||||
id: serializer.fromJson<int>(json['id']),
|
||||
title: serializer.fromJson<String>(json['title']),
|
||||
instructions: serializer.fromJson<String>(json['instructions']),
|
||||
category: serializer.fromJson<int?>(json['category']),
|
||||
);
|
||||
}
|
||||
factory Recipe.fromJsonString(String encodedJson,
|
||||
{ValueSerializer? serializer}) =>
|
||||
Recipe.fromJson(DataClass.parseJson(encodedJson) as Map<String, dynamic>,
|
||||
serializer: serializer);
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'id': serializer.toJson<int>(id),
|
||||
'title': serializer.toJson<String>(title),
|
||||
'instructions': serializer.toJson<String>(instructions),
|
||||
'category': serializer.toJson<int?>(category),
|
||||
};
|
||||
}
|
||||
|
||||
Recipe copyWith(
|
||||
{int? id,
|
||||
String? title,
|
||||
String? instructions,
|
||||
Value<int?> category = const Value.absent()}) =>
|
||||
Recipe(
|
||||
id: id ?? this.id,
|
||||
title: title ?? this.title,
|
||||
instructions: instructions ?? this.instructions,
|
||||
category: category.present ? category.value : this.category,
|
||||
);
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('Recipe(')
|
||||
..write('id: $id, ')
|
||||
..write('title: $title, ')
|
||||
..write('instructions: $instructions, ')
|
||||
..write('category: $category')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(id, title, instructions, category);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is Recipe &&
|
||||
other.id == this.id &&
|
||||
other.title == this.title &&
|
||||
other.instructions == this.instructions &&
|
||||
other.category == this.category);
|
||||
}
|
||||
|
||||
class RecipesCompanion extends UpdateCompanion<Recipe> {
|
||||
final Value<int> id;
|
||||
final Value<String> title;
|
||||
final Value<String> instructions;
|
||||
final Value<int?> category;
|
||||
const RecipesCompanion({
|
||||
this.id = const Value.absent(),
|
||||
this.title = const Value.absent(),
|
||||
this.instructions = const Value.absent(),
|
||||
this.category = const Value.absent(),
|
||||
});
|
||||
RecipesCompanion.insert({
|
||||
this.id = const Value.absent(),
|
||||
required String title,
|
||||
required String instructions,
|
||||
this.category = const Value.absent(),
|
||||
}) : title = Value(title),
|
||||
instructions = Value(instructions);
|
||||
static Insertable<Recipe> custom({
|
||||
Expression<int>? id,
|
||||
Expression<String>? title,
|
||||
Expression<String>? instructions,
|
||||
Expression<int>? category,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (id != null) 'id': id,
|
||||
if (title != null) 'title': title,
|
||||
if (instructions != null) 'instructions': instructions,
|
||||
if (category != null) 'category': category,
|
||||
});
|
||||
}
|
||||
|
||||
RecipesCompanion copyWith(
|
||||
{Value<int>? id,
|
||||
Value<String>? title,
|
||||
Value<String>? instructions,
|
||||
Value<int?>? category}) {
|
||||
return RecipesCompanion(
|
||||
id: id ?? this.id,
|
||||
title: title ?? this.title,
|
||||
instructions: instructions ?? this.instructions,
|
||||
category: category ?? this.category,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
if (id.present) {
|
||||
map['id'] = Variable<int>(id.value);
|
||||
}
|
||||
if (title.present) {
|
||||
map['title'] = Variable<String>(title.value);
|
||||
}
|
||||
if (instructions.present) {
|
||||
map['instructions'] = Variable<String>(instructions.value);
|
||||
}
|
||||
if (category.present) {
|
||||
map['category'] = Variable<int?>(category.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('RecipesCompanion(')
|
||||
..write('id: $id, ')
|
||||
..write('title: $title, ')
|
||||
..write('instructions: $instructions, ')
|
||||
..write('category: $category')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $RecipesTable extends Recipes with TableInfo<$RecipesTable, Recipe> {
|
||||
final GeneratedDatabase _db;
|
||||
final String? _alias;
|
||||
$RecipesTable(this._db, [this._alias]);
|
||||
final VerificationMeta _idMeta = const VerificationMeta('id');
|
||||
late final GeneratedColumn<int?> id = GeneratedColumn<int?>(
|
||||
'id', aliasedName, false,
|
||||
typeName: 'INTEGER',
|
||||
requiredDuringInsert: false,
|
||||
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
|
||||
final VerificationMeta _titleMeta = const VerificationMeta('title');
|
||||
late final GeneratedColumn<String?> title = GeneratedColumn<String?>(
|
||||
'title', aliasedName, false,
|
||||
additionalChecks: GeneratedColumn.checkTextLength(maxTextLength: 16),
|
||||
typeName: 'TEXT',
|
||||
requiredDuringInsert: true);
|
||||
final VerificationMeta _instructionsMeta =
|
||||
const VerificationMeta('instructions');
|
||||
late final GeneratedColumn<String?> instructions = GeneratedColumn<String?>(
|
||||
'instructions', aliasedName, false,
|
||||
typeName: 'TEXT', requiredDuringInsert: true);
|
||||
final VerificationMeta _categoryMeta = const VerificationMeta('category');
|
||||
late final GeneratedColumn<int?> category = GeneratedColumn<int?>(
|
||||
'category', aliasedName, true,
|
||||
typeName: 'INTEGER', requiredDuringInsert: false);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [id, title, instructions, category];
|
||||
@override
|
||||
String get aliasedName => _alias ?? 'recipes';
|
||||
@override
|
||||
String get actualTableName => 'recipes';
|
||||
@override
|
||||
VerificationContext validateIntegrity(Insertable<Recipe> instance,
|
||||
{bool isInserting = false}) {
|
||||
final context = VerificationContext();
|
||||
final data = instance.toColumns(true);
|
||||
if (data.containsKey('id')) {
|
||||
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
||||
}
|
||||
if (data.containsKey('title')) {
|
||||
context.handle(
|
||||
_titleMeta, title.isAcceptableOrUnknown(data['title']!, _titleMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_titleMeta);
|
||||
}
|
||||
if (data.containsKey('instructions')) {
|
||||
context.handle(
|
||||
_instructionsMeta,
|
||||
instructions.isAcceptableOrUnknown(
|
||||
data['instructions']!, _instructionsMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_instructionsMeta);
|
||||
}
|
||||
if (data.containsKey('category')) {
|
||||
context.handle(_categoryMeta,
|
||||
category.isAcceptableOrUnknown(data['category']!, _categoryMeta));
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@override
|
||||
Set<GeneratedColumn> get $primaryKey => {id};
|
||||
@override
|
||||
Recipe map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
return Recipe.fromData(data, _db,
|
||||
prefix: tablePrefix != null ? '$tablePrefix.' : null);
|
||||
}
|
||||
|
||||
@override
|
||||
$RecipesTable createAlias(String alias) {
|
||||
return $RecipesTable(_db, alias);
|
||||
}
|
||||
}
|
||||
|
||||
class Ingredient extends DataClass implements Insertable<Ingredient> {
|
||||
final int id;
|
||||
final String name;
|
||||
final int caloriesPer100g;
|
||||
Ingredient(
|
||||
{required this.id, required this.name, required this.caloriesPer100g});
|
||||
factory Ingredient.fromData(Map<String, dynamic> data, GeneratedDatabase db,
|
||||
{String? prefix}) {
|
||||
final effectivePrefix = prefix ?? '';
|
||||
return Ingredient(
|
||||
id: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}id'])!,
|
||||
name: const StringType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}name'])!,
|
||||
caloriesPer100g: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}calories'])!,
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['id'] = Variable<int>(id);
|
||||
map['name'] = Variable<String>(name);
|
||||
map['calories'] = Variable<int>(caloriesPer100g);
|
||||
return map;
|
||||
}
|
||||
|
||||
IngredientsCompanion toCompanion(bool nullToAbsent) {
|
||||
return IngredientsCompanion(
|
||||
id: Value(id),
|
||||
name: Value(name),
|
||||
caloriesPer100g: Value(caloriesPer100g),
|
||||
);
|
||||
}
|
||||
|
||||
factory Ingredient.fromJson(Map<String, dynamic> json,
|
||||
{ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return Ingredient(
|
||||
id: serializer.fromJson<int>(json['id']),
|
||||
name: serializer.fromJson<String>(json['name']),
|
||||
caloriesPer100g: serializer.fromJson<int>(json['caloriesPer100g']),
|
||||
);
|
||||
}
|
||||
factory Ingredient.fromJsonString(String encodedJson,
|
||||
{ValueSerializer? serializer}) =>
|
||||
Ingredient.fromJson(
|
||||
DataClass.parseJson(encodedJson) as Map<String, dynamic>,
|
||||
serializer: serializer);
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'id': serializer.toJson<int>(id),
|
||||
'name': serializer.toJson<String>(name),
|
||||
'caloriesPer100g': serializer.toJson<int>(caloriesPer100g),
|
||||
};
|
||||
}
|
||||
|
||||
Ingredient copyWith({int? id, String? name, int? caloriesPer100g}) =>
|
||||
Ingredient(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
caloriesPer100g: caloriesPer100g ?? this.caloriesPer100g,
|
||||
);
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('Ingredient(')
|
||||
..write('id: $id, ')
|
||||
..write('name: $name, ')
|
||||
..write('caloriesPer100g: $caloriesPer100g')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(id, name, caloriesPer100g);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is Ingredient &&
|
||||
other.id == this.id &&
|
||||
other.name == this.name &&
|
||||
other.caloriesPer100g == this.caloriesPer100g);
|
||||
}
|
||||
|
||||
class IngredientsCompanion extends UpdateCompanion<Ingredient> {
|
||||
final Value<int> id;
|
||||
final Value<String> name;
|
||||
final Value<int> caloriesPer100g;
|
||||
const IngredientsCompanion({
|
||||
this.id = const Value.absent(),
|
||||
this.name = const Value.absent(),
|
||||
this.caloriesPer100g = const Value.absent(),
|
||||
});
|
||||
IngredientsCompanion.insert({
|
||||
this.id = const Value.absent(),
|
||||
required String name,
|
||||
required int caloriesPer100g,
|
||||
}) : name = Value(name),
|
||||
caloriesPer100g = Value(caloriesPer100g);
|
||||
static Insertable<Ingredient> custom({
|
||||
Expression<int>? id,
|
||||
Expression<String>? name,
|
||||
Expression<int>? caloriesPer100g,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (id != null) 'id': id,
|
||||
if (name != null) 'name': name,
|
||||
if (caloriesPer100g != null) 'calories': caloriesPer100g,
|
||||
});
|
||||
}
|
||||
|
||||
IngredientsCompanion copyWith(
|
||||
{Value<int>? id, Value<String>? name, Value<int>? caloriesPer100g}) {
|
||||
return IngredientsCompanion(
|
||||
id: id ?? this.id,
|
||||
name: name ?? this.name,
|
||||
caloriesPer100g: caloriesPer100g ?? this.caloriesPer100g,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
if (id.present) {
|
||||
map['id'] = Variable<int>(id.value);
|
||||
}
|
||||
if (name.present) {
|
||||
map['name'] = Variable<String>(name.value);
|
||||
}
|
||||
if (caloriesPer100g.present) {
|
||||
map['calories'] = Variable<int>(caloriesPer100g.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('IngredientsCompanion(')
|
||||
..write('id: $id, ')
|
||||
..write('name: $name, ')
|
||||
..write('caloriesPer100g: $caloriesPer100g')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $IngredientsTable extends Ingredients
|
||||
with TableInfo<$IngredientsTable, Ingredient> {
|
||||
final GeneratedDatabase _db;
|
||||
final String? _alias;
|
||||
$IngredientsTable(this._db, [this._alias]);
|
||||
final VerificationMeta _idMeta = const VerificationMeta('id');
|
||||
late final GeneratedColumn<int?> id = GeneratedColumn<int?>(
|
||||
'id', aliasedName, false,
|
||||
typeName: 'INTEGER',
|
||||
requiredDuringInsert: false,
|
||||
defaultConstraints: 'PRIMARY KEY AUTOINCREMENT');
|
||||
final VerificationMeta _nameMeta = const VerificationMeta('name');
|
||||
late final GeneratedColumn<String?> name = GeneratedColumn<String?>(
|
||||
'name', aliasedName, false,
|
||||
typeName: 'TEXT', requiredDuringInsert: true);
|
||||
final VerificationMeta _caloriesPer100gMeta =
|
||||
const VerificationMeta('caloriesPer100g');
|
||||
late final GeneratedColumn<int?> caloriesPer100g = GeneratedColumn<int?>(
|
||||
'calories', aliasedName, false,
|
||||
typeName: 'INTEGER', requiredDuringInsert: true);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [id, name, caloriesPer100g];
|
||||
@override
|
||||
String get aliasedName => _alias ?? 'ingredients';
|
||||
@override
|
||||
String get actualTableName => 'ingredients';
|
||||
@override
|
||||
VerificationContext validateIntegrity(Insertable<Ingredient> instance,
|
||||
{bool isInserting = false}) {
|
||||
final context = VerificationContext();
|
||||
final data = instance.toColumns(true);
|
||||
if (data.containsKey('id')) {
|
||||
context.handle(_idMeta, id.isAcceptableOrUnknown(data['id']!, _idMeta));
|
||||
}
|
||||
if (data.containsKey('name')) {
|
||||
context.handle(
|
||||
_nameMeta, name.isAcceptableOrUnknown(data['name']!, _nameMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_nameMeta);
|
||||
}
|
||||
if (data.containsKey('calories')) {
|
||||
context.handle(
|
||||
_caloriesPer100gMeta,
|
||||
caloriesPer100g.isAcceptableOrUnknown(
|
||||
data['calories']!, _caloriesPer100gMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_caloriesPer100gMeta);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@override
|
||||
Set<GeneratedColumn> get $primaryKey => {id};
|
||||
@override
|
||||
Ingredient map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
return Ingredient.fromData(data, _db,
|
||||
prefix: tablePrefix != null ? '$tablePrefix.' : null);
|
||||
}
|
||||
|
||||
@override
|
||||
$IngredientsTable createAlias(String alias) {
|
||||
return $IngredientsTable(_db, alias);
|
||||
}
|
||||
}
|
||||
|
||||
class IngredientInRecipe extends DataClass
|
||||
implements Insertable<IngredientInRecipe> {
|
||||
final int recipe;
|
||||
final int ingredient;
|
||||
final int amountInGrams;
|
||||
IngredientInRecipe(
|
||||
{required this.recipe,
|
||||
required this.ingredient,
|
||||
required this.amountInGrams});
|
||||
factory IngredientInRecipe.fromData(
|
||||
Map<String, dynamic> data, GeneratedDatabase db,
|
||||
{String? prefix}) {
|
||||
final effectivePrefix = prefix ?? '';
|
||||
return IngredientInRecipe(
|
||||
recipe: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}recipe'])!,
|
||||
ingredient: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}ingredient'])!,
|
||||
amountInGrams: const IntType()
|
||||
.mapFromDatabaseResponse(data['${effectivePrefix}amount'])!,
|
||||
);
|
||||
}
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
map['recipe'] = Variable<int>(recipe);
|
||||
map['ingredient'] = Variable<int>(ingredient);
|
||||
map['amount'] = Variable<int>(amountInGrams);
|
||||
return map;
|
||||
}
|
||||
|
||||
IngredientInRecipesCompanion toCompanion(bool nullToAbsent) {
|
||||
return IngredientInRecipesCompanion(
|
||||
recipe: Value(recipe),
|
||||
ingredient: Value(ingredient),
|
||||
amountInGrams: Value(amountInGrams),
|
||||
);
|
||||
}
|
||||
|
||||
factory IngredientInRecipe.fromJson(Map<String, dynamic> json,
|
||||
{ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return IngredientInRecipe(
|
||||
recipe: serializer.fromJson<int>(json['recipe']),
|
||||
ingredient: serializer.fromJson<int>(json['ingredient']),
|
||||
amountInGrams: serializer.fromJson<int>(json['amountInGrams']),
|
||||
);
|
||||
}
|
||||
factory IngredientInRecipe.fromJsonString(String encodedJson,
|
||||
{ValueSerializer? serializer}) =>
|
||||
IngredientInRecipe.fromJson(
|
||||
DataClass.parseJson(encodedJson) as Map<String, dynamic>,
|
||||
serializer: serializer);
|
||||
@override
|
||||
Map<String, dynamic> toJson({ValueSerializer? serializer}) {
|
||||
serializer ??= moorRuntimeOptions.defaultSerializer;
|
||||
return <String, dynamic>{
|
||||
'recipe': serializer.toJson<int>(recipe),
|
||||
'ingredient': serializer.toJson<int>(ingredient),
|
||||
'amountInGrams': serializer.toJson<int>(amountInGrams),
|
||||
};
|
||||
}
|
||||
|
||||
IngredientInRecipe copyWith(
|
||||
{int? recipe, int? ingredient, int? amountInGrams}) =>
|
||||
IngredientInRecipe(
|
||||
recipe: recipe ?? this.recipe,
|
||||
ingredient: ingredient ?? this.ingredient,
|
||||
amountInGrams: amountInGrams ?? this.amountInGrams,
|
||||
);
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('IngredientInRecipe(')
|
||||
..write('recipe: $recipe, ')
|
||||
..write('ingredient: $ingredient, ')
|
||||
..write('amountInGrams: $amountInGrams')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
|
||||
@override
|
||||
int get hashCode => Object.hash(recipe, ingredient, amountInGrams);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is IngredientInRecipe &&
|
||||
other.recipe == this.recipe &&
|
||||
other.ingredient == this.ingredient &&
|
||||
other.amountInGrams == this.amountInGrams);
|
||||
}
|
||||
|
||||
class IngredientInRecipesCompanion extends UpdateCompanion<IngredientInRecipe> {
|
||||
final Value<int> recipe;
|
||||
final Value<int> ingredient;
|
||||
final Value<int> amountInGrams;
|
||||
const IngredientInRecipesCompanion({
|
||||
this.recipe = const Value.absent(),
|
||||
this.ingredient = const Value.absent(),
|
||||
this.amountInGrams = const Value.absent(),
|
||||
});
|
||||
IngredientInRecipesCompanion.insert({
|
||||
required int recipe,
|
||||
required int ingredient,
|
||||
required int amountInGrams,
|
||||
}) : recipe = Value(recipe),
|
||||
ingredient = Value(ingredient),
|
||||
amountInGrams = Value(amountInGrams);
|
||||
static Insertable<IngredientInRecipe> custom({
|
||||
Expression<int>? recipe,
|
||||
Expression<int>? ingredient,
|
||||
Expression<int>? amountInGrams,
|
||||
}) {
|
||||
return RawValuesInsertable({
|
||||
if (recipe != null) 'recipe': recipe,
|
||||
if (ingredient != null) 'ingredient': ingredient,
|
||||
if (amountInGrams != null) 'amount': amountInGrams,
|
||||
});
|
||||
}
|
||||
|
||||
IngredientInRecipesCompanion copyWith(
|
||||
{Value<int>? recipe, Value<int>? ingredient, Value<int>? amountInGrams}) {
|
||||
return IngredientInRecipesCompanion(
|
||||
recipe: recipe ?? this.recipe,
|
||||
ingredient: ingredient ?? this.ingredient,
|
||||
amountInGrams: amountInGrams ?? this.amountInGrams,
|
||||
);
|
||||
}
|
||||
|
||||
@override
|
||||
Map<String, Expression> toColumns(bool nullToAbsent) {
|
||||
final map = <String, Expression>{};
|
||||
if (recipe.present) {
|
||||
map['recipe'] = Variable<int>(recipe.value);
|
||||
}
|
||||
if (ingredient.present) {
|
||||
map['ingredient'] = Variable<int>(ingredient.value);
|
||||
}
|
||||
if (amountInGrams.present) {
|
||||
map['amount'] = Variable<int>(amountInGrams.value);
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('IngredientInRecipesCompanion(')
|
||||
..write('recipe: $recipe, ')
|
||||
..write('ingredient: $ingredient, ')
|
||||
..write('amountInGrams: $amountInGrams')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
}
|
||||
|
||||
class $IngredientInRecipesTable extends IngredientInRecipes
|
||||
with TableInfo<$IngredientInRecipesTable, IngredientInRecipe> {
|
||||
final GeneratedDatabase _db;
|
||||
final String? _alias;
|
||||
$IngredientInRecipesTable(this._db, [this._alias]);
|
||||
final VerificationMeta _recipeMeta = const VerificationMeta('recipe');
|
||||
late final GeneratedColumn<int?> recipe = GeneratedColumn<int?>(
|
||||
'recipe', aliasedName, false,
|
||||
typeName: 'INTEGER', requiredDuringInsert: true);
|
||||
final VerificationMeta _ingredientMeta = const VerificationMeta('ingredient');
|
||||
late final GeneratedColumn<int?> ingredient = GeneratedColumn<int?>(
|
||||
'ingredient', aliasedName, false,
|
||||
typeName: 'INTEGER', requiredDuringInsert: true);
|
||||
final VerificationMeta _amountInGramsMeta =
|
||||
const VerificationMeta('amountInGrams');
|
||||
late final GeneratedColumn<int?> amountInGrams = GeneratedColumn<int?>(
|
||||
'amount', aliasedName, false,
|
||||
typeName: 'INTEGER', requiredDuringInsert: true);
|
||||
@override
|
||||
List<GeneratedColumn> get $columns => [recipe, ingredient, amountInGrams];
|
||||
@override
|
||||
String get aliasedName => _alias ?? 'recipe_ingredients';
|
||||
@override
|
||||
String get actualTableName => 'recipe_ingredients';
|
||||
@override
|
||||
VerificationContext validateIntegrity(Insertable<IngredientInRecipe> instance,
|
||||
{bool isInserting = false}) {
|
||||
final context = VerificationContext();
|
||||
final data = instance.toColumns(true);
|
||||
if (data.containsKey('recipe')) {
|
||||
context.handle(_recipeMeta,
|
||||
recipe.isAcceptableOrUnknown(data['recipe']!, _recipeMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_recipeMeta);
|
||||
}
|
||||
if (data.containsKey('ingredient')) {
|
||||
context.handle(
|
||||
_ingredientMeta,
|
||||
ingredient.isAcceptableOrUnknown(
|
||||
data['ingredient']!, _ingredientMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_ingredientMeta);
|
||||
}
|
||||
if (data.containsKey('amount')) {
|
||||
context.handle(
|
||||
_amountInGramsMeta,
|
||||
amountInGrams.isAcceptableOrUnknown(
|
||||
data['amount']!, _amountInGramsMeta));
|
||||
} else if (isInserting) {
|
||||
context.missing(_amountInGramsMeta);
|
||||
}
|
||||
return context;
|
||||
}
|
||||
|
||||
@override
|
||||
Set<GeneratedColumn> get $primaryKey => {recipe, ingredient};
|
||||
@override
|
||||
IngredientInRecipe map(Map<String, dynamic> data, {String? tablePrefix}) {
|
||||
return IngredientInRecipe.fromData(data, _db,
|
||||
prefix: tablePrefix != null ? '$tablePrefix.' : null);
|
||||
}
|
||||
|
||||
@override
|
||||
$IngredientInRecipesTable createAlias(String alias) {
|
||||
return $IngredientInRecipesTable(_db, alias);
|
||||
}
|
||||
}
|
||||
|
||||
abstract class _$Database extends GeneratedDatabase {
|
||||
_$Database(QueryExecutor e) : super(SqlTypeSystem.defaultInstance, e);
|
||||
_$Database.connect(DatabaseConnection c) : super.connect(c);
|
||||
late final $CategoriesTable categories = $CategoriesTable(this);
|
||||
late final $RecipesTable recipes = $RecipesTable(this);
|
||||
late final $IngredientsTable ingredients = $IngredientsTable(this);
|
||||
late final $IngredientInRecipesTable ingredientInRecipes =
|
||||
$IngredientInRecipesTable(this);
|
||||
Selectable<TotalWeightResult> totalWeight() {
|
||||
return customSelect(
|
||||
'SELECT r.title, SUM(ir.amount) AS total_weight FROM recipes AS r INNER JOIN recipe_ingredients AS ir ON ir.recipe = r.id GROUP BY r.id',
|
||||
variables: [],
|
||||
readsFrom: {
|
||||
recipes,
|
||||
ingredientInRecipes,
|
||||
}).map((QueryRow row) {
|
||||
return TotalWeightResult(
|
||||
row: row,
|
||||
title: row.read<String>('title'),
|
||||
totalWeight: row.read<int>('total_weight'),
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
@override
|
||||
Iterable<TableInfo> get allTables => allSchemaEntities.whereType<TableInfo>();
|
||||
@override
|
||||
List<DatabaseSchemaEntity> get allSchemaEntities =>
|
||||
[categories, recipes, ingredients, ingredientInRecipes];
|
||||
}
|
||||
|
||||
class TotalWeightResult extends CustomResultSet {
|
||||
final String title;
|
||||
final int totalWeight;
|
||||
TotalWeightResult({
|
||||
required QueryRow row,
|
||||
required this.title,
|
||||
required this.totalWeight,
|
||||
}) : super(row);
|
||||
@override
|
||||
int get hashCode => Object.hash(title, totalWeight);
|
||||
@override
|
||||
bool operator ==(Object other) =>
|
||||
identical(this, other) ||
|
||||
(other is TotalWeightResult &&
|
||||
other.title == this.title &&
|
||||
other.totalWeight == this.totalWeight);
|
||||
@override
|
||||
String toString() {
|
||||
return (StringBuffer('TotalWeightResult(')
|
||||
..write('title: $title, ')
|
||||
..write('totalWeight: $totalWeight')
|
||||
..write(')'))
|
||||
.toString();
|
||||
}
|
||||
}
|
|
@ -1,10 +0,0 @@
|
|||
dart:
|
||||
- stable
|
||||
|
||||
stages:
|
||||
- analyze:
|
||||
- dartanalyzer: --fatal-infos --fatal-warnings lib/ test/
|
||||
- dartfmt
|
||||
- unit_test:
|
||||
- command: pub run build_runner build -v --delete-conflicting-outputs
|
||||
- test
|
|
@ -1,43 +0,0 @@
|
|||
//@dart=2.6
|
||||
|
||||
import 'dart:convert';
|
||||
import 'dart:isolate';
|
||||
|
||||
import 'package:moor_generator/integrations/plugin.dart' as plugin;
|
||||
import 'package:web_socket_channel/io.dart';
|
||||
|
||||
const useDebuggingVariant = false;
|
||||
|
||||
void main(List<String> args, SendPort sendPort) {
|
||||
if (useDebuggingVariant) {
|
||||
_PluginProxy(sendPort).start();
|
||||
} else {
|
||||
plugin.start(args, sendPort);
|
||||
}
|
||||
}
|
||||
|
||||
// Used during development. See CONTRIBUTING.md in the moor repo on how to debug
|
||||
// the plugin.
|
||||
class _PluginProxy {
|
||||
final SendPort sendToAnalysisServer;
|
||||
|
||||
ReceivePort _receive;
|
||||
IOWebSocketChannel _channel;
|
||||
|
||||
_PluginProxy(this.sendToAnalysisServer);
|
||||
|
||||
Future<void> start() async {
|
||||
_channel = IOWebSocketChannel.connect('ws://localhost:9999');
|
||||
_receive = ReceivePort();
|
||||
sendToAnalysisServer.send(_receive.sendPort);
|
||||
|
||||
_receive.listen((data) {
|
||||
// the server will send messages as maps, convert to json
|
||||
_channel.sink.add(json.encode(data));
|
||||
});
|
||||
|
||||
_channel.stream.listen((data) {
|
||||
sendToAnalysisServer.send(json.decode(data as String));
|
||||
});
|
||||
}
|
||||
}
|
|
@ -1,18 +0,0 @@
|
|||
name: analyzer_load_moor_plugin
|
||||
version: 1.0.0
|
||||
description: This pubspec is a part of moor and determines the version of the moor analyzer to load
|
||||
|
||||
environment:
|
||||
sdk: '>=2.9.0 <3.0.0'
|
||||
|
||||
dependencies:
|
||||
moor_generator: ^4.4.1
|
||||
web_socket_channel: ^1.0.15
|
||||
|
||||
# These overrides are only needed when working on the plugin with useDebuggingVariant = false (not recommended)
|
||||
|
||||
#dependency_overrides:
|
||||
# moor_generator:
|
||||
# path: /path/to/moor/moor_generator
|
||||
# sqlparser:
|
||||
# path: /path/to/moor/sqlparser
|
|
@ -1 +0,0 @@
|
|||
sqflite=/home/simon/Android/flutter/.pub-cache/hosted/pub.dartlang.org/sqflite-1.1.0/
|
|
@ -1,10 +0,0 @@
|
|||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
|
||||
channel: stable
|
||||
|
||||
project_type: package
|
|
@ -1,145 +0,0 @@
|
|||
## 4.1.0
|
||||
|
||||
- Support query cancellations introduced in moor 4.3.0
|
||||
- Clarify that this package has been renamed to `drift`.
|
||||
|
||||
## 4.0.0
|
||||
|
||||
- Support moor version 4
|
||||
- Migrate to null-safety
|
||||
|
||||
## 3.1.0
|
||||
|
||||
Don't write the schema version to the database if the migration throws an exception.
|
||||
|
||||
## 3.0.0
|
||||
|
||||
Support `moor` version 3.0. To learn what's new, head over to [its changelog](https://pub.dev/packages/moor).
|
||||
|
||||
## 2.1.1
|
||||
|
||||
- Fix `runCustom` not using the provided variables ([#406](https://github.com/simolus3/drift/issues/406))
|
||||
|
||||
## 2.1.0
|
||||
|
||||
- Expose the underlying database from sqflite in `FlutterQueryExecutor`.
|
||||
This exists only to make migrations to moor easier.
|
||||
|
||||
## 2.0.0
|
||||
See the changelog of [moor](https://pub.dev/packages/moor#-changelog-tab-) for details,
|
||||
or check out an overview of new features [here](https://drift.simonbinder.eu/v2)
|
||||
|
||||
## 1.7.0
|
||||
- Support custom columns via type converters. See the [docs](https://drift.simonbinder.eu/type_converters)
|
||||
for details on how to use this feature.
|
||||
- Transactions now roll back when not completed successfully, they also rethrow the exception
|
||||
to make debugging easier.
|
||||
- New `backends` api, making it easier to write database drivers that work with moor. Apart from
|
||||
`moor_flutter`, new experimental backends can be checked out from git:
|
||||
1. `encrypted_moor`: An encrypted moor database: https://github.com/simolus3/drift/tree/develop/extras/encryption
|
||||
- The compiled sql feature is no longer experimental and will stay stable until a major version bump
|
||||
- New, experimental support for `.moor` files! Instead of declaring your tables in Dart, you can
|
||||
choose to declare them with sql by writing the `CREATE TABLE` statement in a `.moor` file.
|
||||
You can then use these tables in the database and with daos by using the `include` parameter
|
||||
on `@UseMoor` and `@UseDao`. Again, please notice that this is an experimental api and there
|
||||
might be some hiccups. Please report any issues you run into.
|
||||
|
||||
## 1.6.0
|
||||
- Experimental web support! See [the documentation](https://drift.simonbinder.eu/web) for details.
|
||||
- Make transactions easier to use: Thanks to some Dart async magic, you no longer need to run
|
||||
queries on the transaction explicitly. This
|
||||
```dart
|
||||
Future deleteCategory(Category category) {
|
||||
return transaction((t) async {
|
||||
await t.delete(categories).delete(category);
|
||||
});
|
||||
}
|
||||
```
|
||||
is now the same as this (notice how we don't have to use the `t.` in front of the delete)
|
||||
```dart
|
||||
Future deleteCategory(Category category) {
|
||||
return transaction((t) async {
|
||||
await delete(categories).delete(category);
|
||||
});
|
||||
}
|
||||
```
|
||||
This makes it much easier to compose operations by extracting them into methods, as you don't
|
||||
have to worry about not using the `t` parameter.
|
||||
- Moor now provides syntax sugar for list parameters in compiled custom queries
|
||||
(`SELECT * FROM entries WHERE id IN ?`)
|
||||
- Support `COLLATE` expressions.
|
||||
- Date time columns are now comparable
|
||||
- The `StringType` now supports arbitrary data from sqlite ([#70](https://github.com/simolus3/drift/pull/70)).
|
||||
Thanks, [knaeckeKami](https://github.com/knaeckeKami)!
|
||||
- Bugfixes related to stream queries and `LIMIT` clauses.
|
||||
|
||||
## 1.5.0
|
||||
This version introduces some new concepts and features, which are explained in more detail below.
|
||||
Here is a quick overview of the new features:
|
||||
- More consistent and reliable callbacks for migrations. You can now use `MigrationStrategy.beforeOpen`
|
||||
to run queries after migrations, but before fully opening the database. This is useful to initialize data.
|
||||
- Greatly expanded documentation, introduced additional checks to provide more helpful error messages
|
||||
- New `getSingle` and `watchSingle` methods on queries: Queries that you know will only
|
||||
return one row can now be instructed to return the value directly instead of wrapping it in a list.
|
||||
- New "update companion" classes to clearly separate between absent values and explicitly setting
|
||||
values back to null - explained below.
|
||||
- Experimental support for compiled sql queries: __Moor can now generate typesafe APIs for
|
||||
written sql__. Read on to get started.
|
||||
|
||||
### Update companions
|
||||
Newly introduced "Update companions" allow you to insert or update data more precisely than before.
|
||||
Previously, there was no clear separation between "null" and absent values. For instance, let's
|
||||
say we had a table "users" that stores an id, a name, and an age. Now, let's say we wanted to set
|
||||
the age of a user to null without changing its name. Would we use `User(age: null)`? Here,
|
||||
the `name` column would implicitly be set to null, so we can't cleanly separate that. However,
|
||||
with `UsersCompanion(age: Value(null))`, we know the difference between `Value(null)` and the
|
||||
default `Value.absent()`.
|
||||
|
||||
Don't worry, all your existing code will continue to work, this change is fully backwards
|
||||
compatible. You might get analyzer warnings about missing required fields. The migration to
|
||||
update companions will fix that. Replacing normal classes with their update companions is simple
|
||||
and the only thing needed to fix that. The [documentation](https://drift.simonbinder.eu/queries/#updates-and-deletes)
|
||||
has been updated to reflect this. If you have additional questions, feel free to
|
||||
[create an issue](https://github.com/simolus3/drift/issues/new).
|
||||
### Compiled sql queries
|
||||
Experimental support for compile time custom statements. Sounds super boring, but it
|
||||
actually gives you a fluent way to write queries in pure sql. The moor generator will figure
|
||||
out what your queries return and automatically generate the boring mapping part. Head on to
|
||||
[the documentation](https://drift.simonbinder.eu/queries/custom) to find out how to use this new feature.
|
||||
|
||||
Please note that this feature is in an experimental state: Expect minor, but breaking changes
|
||||
in the API and in the generated code. Also, if you run into any issues with this feature,
|
||||
[reporting them](https://github.com/simolus3/drift/issues/new) would be super appreciated.
|
||||
|
||||
## 1.4.0
|
||||
- Added the `RealColumn`, which stores floating point values
|
||||
- Better configuration for the serializer with the `JsonKey` annotation and the ability to
|
||||
use a custom `ValueSerializer`s
|
||||
|
||||
## 1.3.0
|
||||
- Moor now supports table joins
|
||||
- Added table aliases
|
||||
- Default values for columns: Just use the `withDefault` method when declaring a column
|
||||
- added expressions that resolve to the current date or time
|
||||
- Fixed a crash that would occur if the first operation was a transaction
|
||||
- Better support for custom expressions as part of a regular query
|
||||
- Faster hashcode implementation in generated data classes
|
||||
|
||||
## 1.2.0
|
||||
Changes from the moor and moor_generator libraries:
|
||||
- __Breaking__: Generated DAO classes are now called `_$YourNameHere`, it used to
|
||||
be just `_YourNameHere` (without the dollar sign)
|
||||
- Blob data type
|
||||
- `insertOrReplace` method for insert statements
|
||||
- DAOs can now operate on transactions
|
||||
- Custom constraints
|
||||
- Query streams are now cached so that equal queries yield identical streams.
|
||||
This can improve performance.
|
||||
- Generated classes now use lazy getters instead of recalculating fields on each access
|
||||
- Data classes can be converted from and to json
|
||||
|
||||
## 1.1.0
|
||||
- Transactions
|
||||
|
||||
## 1.0.0
|
||||
- Initial release
|
|
@ -1,21 +0,0 @@
|
|||
MIT License
|
||||
|
||||
Copyright (c) 2019 Simon Binder
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
|
@ -1,8 +0,0 @@
|
|||
# `moor_flutter`
|
||||
|
||||
__Important notice__: Moor has been renamed to Drift.
|
||||
This package will continue to be supported for a while, but we encourage users to migrate to `drift` and `drift_sqflite`.
|
||||
Automated tooling to help you make the switch is available! For more information, see [the documentation](https://drift.simonbinder.eu/name/).
|
||||
Thanks yor your understanding!
|
||||
|
||||
Please see the homepage of [drift](https://drift.simonbinder.eu/) for details on how to use this package.
|
|
@ -1,175 +0,0 @@
|
|||
analyzer:
|
||||
strong-mode:
|
||||
implicit-casts: false
|
||||
errors:
|
||||
unused_element: error
|
||||
unused_import: error
|
||||
unused_local_variable: error
|
||||
dead_code: error
|
||||
public_member_api_docs: ignore # turned on by user-facing subpackages
|
||||
deprecated_member_use_from_same_package: ignore
|
||||
exclude:
|
||||
- "**/*.g.dart"
|
||||
# Will be analyzed anyway, nobody knows why ¯\_(ツ)_/¯. We're only analyzing lib/ and test/ as a workaround
|
||||
- ".dart_tool/build/entrypoint/build.dart"
|
||||
- "tool/**"
|
||||
- "**/*.mocks.dart"
|
||||
|
||||
# this should always include all rules. Those we don't use are commented out
|
||||
linter:
|
||||
rules:
|
||||
# ERROR RULES
|
||||
- avoid_empty_else
|
||||
# - avoid_print (all our prints can be turned off)
|
||||
- avoid_relative_lib_imports
|
||||
- avoid_returning_null_for_future
|
||||
# - avoid_slow_async_io
|
||||
- avoid_types_as_parameter_names
|
||||
- cancel_subscriptions
|
||||
- close_sinks
|
||||
- comment_references
|
||||
- control_flow_in_finally
|
||||
# - diagnostic_describe_all_properties (Flutter-specific, not relevant for us)
|
||||
- empty_statements
|
||||
- hash_and_equals
|
||||
# - invariant_booleans (turned off because the lint rule is buggy)
|
||||
- iterable_contains_unrelated_type
|
||||
- list_remove_unrelated_type
|
||||
- literal_only_boolean_expressions
|
||||
- no_adjacent_strings_in_list
|
||||
- no_duplicate_case_values
|
||||
# - prefer_relative_imports (clashes with avoid_relative_lib_imports)
|
||||
# - prefer_void_to_null (we do use Null as a type for alwaysThrows functions)
|
||||
- test_types_in_equals
|
||||
- throw_in_finally
|
||||
- unnecessary_statements
|
||||
- unrelated_type_equality_checks
|
||||
- unsafe_html
|
||||
- valid_regexps
|
||||
# STYLE RULES
|
||||
- always_declare_return_types
|
||||
# - always_put_control_body_on_new_line (we don't do this if it fits on the same line)
|
||||
# - always_put_required_named_parameters_first (we just don't do this)
|
||||
# - always_require_non_null_named_parameters (we don't use assert foo != null for parameters)
|
||||
# - always_specify_types (we prefer to omit the type parameter when possible)
|
||||
- annotate_overrides
|
||||
# - avoid_annotating_with_dynamic (we prefer to make dynamic explicit)
|
||||
# - avoid_as (we prefer to make explicit casts explicit!)
|
||||
- avoid_bool_literals_in_conditional_expressions
|
||||
# - avoid_catches_without_on_clauses (we have a lot of generic catches)
|
||||
- avoid_catching_errors
|
||||
- avoid_classes_with_only_static_members
|
||||
- avoid_double_and_int_checks
|
||||
# - avoid_equals_and_hash_code_on_mutable_classes (lint is to generic for transient fields)
|
||||
- avoid_field_initializers_in_const_classes
|
||||
- avoid_function_literals_in_foreach_calls
|
||||
# - avoid_implementing_value_types (maybe we can consider turning this on?)
|
||||
- avoid_init_to_null
|
||||
- avoid_js_rounded_ints
|
||||
- avoid_null_checks_in_equality_operators
|
||||
# - avoid_positional_boolean_parameters (there pretty useful when there's only one boolean param)
|
||||
# - avoid_private_typedef_functions (they're still useful)
|
||||
- avoid_renaming_method_parameters
|
||||
- avoid_return_types_on_setters
|
||||
- avoid_returning_null
|
||||
- avoid_returning_null_for_void
|
||||
- avoid_returning_this
|
||||
- avoid_setters_without_getters
|
||||
- avoid_shadowing_type_parameters
|
||||
- avoid_single_cascade_in_expression_statements
|
||||
# - avoid_types_on_closure_parameters (the interference isn't THAT good)
|
||||
# - avoid_unnecessary_containers (Flutter-specific, not relevant here)
|
||||
- avoid_unused_constructor_parameters
|
||||
- avoid_void_async
|
||||
- await_only_futures
|
||||
- camel_case_extensions
|
||||
- camel_case_types
|
||||
# - cascade_invocations (sometimes the explicit notation is more readable)
|
||||
- constant_identifier_names
|
||||
- curly_braces_in_flow_control_structures
|
||||
- directives_ordering
|
||||
- empty_catches
|
||||
- empty_constructor_bodies
|
||||
- file_names
|
||||
# - flutter_style_todos (Flutter-development specific, not relevant here)
|
||||
- implementation_imports
|
||||
- join_return_with_assignment
|
||||
- library_names
|
||||
- library_prefixes
|
||||
- lines_longer_than_80_chars
|
||||
- non_constant_identifier_names
|
||||
- null_closures
|
||||
- omit_local_variable_types
|
||||
# - one_member_abstracts (there are cases where a one-member abstract class makes sense, see moor's Insertable)
|
||||
- only_throw_errors
|
||||
- overridden_fields
|
||||
- package_api_docs
|
||||
# - package_prefixed_library_names (this isn't java)
|
||||
# - parameter_assignments (we regularly use this to set default values)
|
||||
- prefer_adjacent_string_concatenation
|
||||
- prefer_asserts_in_initializer_lists
|
||||
# - prefer_asserts_with_message (it's annoying to write messages for internal invariants)
|
||||
- prefer_collection_literals
|
||||
- prefer_conditional_assignment
|
||||
- prefer_const_constructors
|
||||
- prefer_const_constructors_in_immutables
|
||||
- prefer_const_declarations
|
||||
- prefer_const_literals_to_create_immutables
|
||||
- prefer_constructors_over_static_methods
|
||||
- prefer_contains
|
||||
# - prefer_double_quotes (we prefer single quotes)
|
||||
- prefer_equal_for_default_values
|
||||
# - prefer_expression_function_bodies (for multiline expressions, this is ugly to format)
|
||||
- prefer_final_fields
|
||||
- prefer_final_in_for_each
|
||||
- prefer_final_locals
|
||||
- prefer_for_elements_to_map_fromIterable
|
||||
- prefer_foreach
|
||||
- prefer_function_declarations_over_variables
|
||||
- prefer_generic_function_type_aliases
|
||||
- prefer_if_elements_to_conditional_expressions
|
||||
- prefer_if_null_operators
|
||||
- prefer_initializing_formals
|
||||
- prefer_inlined_adds
|
||||
- prefer_int_literals
|
||||
- prefer_interpolation_to_compose_strings
|
||||
- prefer_is_empty
|
||||
- prefer_is_not_empty
|
||||
- prefer_is_not_operator
|
||||
- prefer_iterable_whereType
|
||||
# - prefer_mixin (todo we could consider enabling this)
|
||||
- prefer_null_aware_operators
|
||||
- prefer_single_quotes
|
||||
- prefer_spread_collections
|
||||
- prefer_typing_uninitialized_variables
|
||||
- provide_deprecation_message
|
||||
- public_member_api_docs
|
||||
- recursive_getters
|
||||
- slash_for_doc_comments
|
||||
# - sort_child_properties_last (Flutter specific)
|
||||
# - sort_constructors_first (we don't do this)
|
||||
# - sort_unnamed_constructors_first
|
||||
- type_annotate_public_apis
|
||||
- type_init_formals
|
||||
- unawaited_futures
|
||||
- unnecessary_brace_in_string_interps
|
||||
- unnecessary_const
|
||||
# - unnecessary_final (we prefer final here)
|
||||
- unnecessary_getters_setters
|
||||
- unnecessary_lambdas
|
||||
- unnecessary_new
|
||||
- unnecessary_null_aware_assignments
|
||||
- unnecessary_null_in_if_null_operators
|
||||
- unnecessary_overrides
|
||||
- unnecessary_parenthesis
|
||||
- unnecessary_this
|
||||
# - use_full_hex_values_for_flutter_colors (Flutter specific)
|
||||
- use_function_type_syntax_for_parameters
|
||||
- use_rethrow_when_possible
|
||||
- use_setters_to_change_properties
|
||||
- use_string_buffers
|
||||
# - use_to_and_as_if_applicable (false positive on operators)
|
||||
- void_checks
|
||||
# PUB RULES
|
||||
- package_names
|
||||
# - sort_pub_dependencies (we prefer to group them by what they do)
|
|
@ -1,25 +0,0 @@
|
|||
package io.flutter.plugins;
|
||||
|
||||
import io.flutter.plugin.common.PluginRegistry;
|
||||
import com.tekartik.sqflite.SqflitePlugin;
|
||||
|
||||
/**
|
||||
* Generated file. Do not edit.
|
||||
*/
|
||||
public final class GeneratedPluginRegistrant {
|
||||
public static void registerWith(PluginRegistry registry) {
|
||||
if (alreadyRegisteredWith(registry)) {
|
||||
return;
|
||||
}
|
||||
SqflitePlugin.registerWith(registry.registrarFor("com.tekartik.sqflite.SqflitePlugin"));
|
||||
}
|
||||
|
||||
private static boolean alreadyRegisteredWith(PluginRegistry registry) {
|
||||
final String key = GeneratedPluginRegistrant.class.getCanonicalName();
|
||||
if (registry.hasPlugin(key)) {
|
||||
return true;
|
||||
}
|
||||
registry.registrarFor(key);
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
# Miscellaneous
|
||||
*.class
|
||||
*.lock
|
||||
*.log
|
||||
*.pyc
|
||||
*.swp
|
||||
.DS_Store
|
||||
.atom/
|
||||
.buildlog/
|
||||
.history
|
||||
.svn/
|
||||
|
||||
# IntelliJ related
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
|
||||
# Visual Studio Code related
|
||||
.vscode/
|
||||
|
||||
# Flutter/Dart/Pub related
|
||||
**/doc/api/
|
||||
.dart_tool/
|
||||
.flutter-plugins
|
||||
.packages
|
||||
.pub-cache/
|
||||
.pub/
|
||||
build/
|
||||
|
||||
# Android related
|
||||
**/android/**/gradle-wrapper.jar
|
||||
**/android/.gradle
|
||||
**/android/captures/
|
||||
**/android/gradlew
|
||||
**/android/gradlew.bat
|
||||
**/android/local.properties
|
||||
**/android/**/GeneratedPluginRegistrant.java
|
||||
|
||||
# iOS/XCode related
|
||||
**/ios/**/*.mode1v3
|
||||
**/ios/**/*.mode2v3
|
||||
**/ios/**/*.moved-aside
|
||||
**/ios/**/*.pbxuser
|
||||
**/ios/**/*.perspectivev3
|
||||
**/ios/**/*sync/
|
||||
**/ios/**/.sconsign.dblite
|
||||
**/ios/**/.tags*
|
||||
**/ios/**/.vagrant/
|
||||
**/ios/**/DerivedData/
|
||||
**/ios/**/Icon?
|
||||
**/ios/**/Pods/
|
||||
**/ios/**/.symlinks/
|
||||
**/ios/**/profile
|
||||
**/ios/**/xcuserdata
|
||||
**/ios/.generated/
|
||||
**/ios/Flutter/App.framework
|
||||
**/ios/Flutter/Flutter.framework
|
||||
**/ios/Flutter/Generated.xcconfig
|
||||
**/ios/Flutter/app.flx
|
||||
**/ios/Flutter/app.zip
|
||||
**/ios/Flutter/flutter_assets/
|
||||
**/ios/ServiceDefinitions.json
|
||||
**/ios/Runner/GeneratedPluginRegistrant.*
|
||||
|
||||
# Exceptions to above rules.
|
||||
!**/ios/**/default.mode1v3
|
||||
!**/ios/**/default.mode2v3
|
||||
!**/ios/**/default.pbxuser
|
||||
!**/ios/**/default.perspectivev3
|
||||
!/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
|
|
@ -1,10 +0,0 @@
|
|||
# This file tracks properties of this Flutter project.
|
||||
# Used by Flutter tool to assess capabilities and perform upgrades etc.
|
||||
#
|
||||
# This file should be version controlled and should not be manually edited.
|
||||
|
||||
version:
|
||||
revision: 5391447fae6209bb21a89e6a5a6583cac1af9b4b
|
||||
channel: stable
|
||||
|
||||
project_type: app
|
|
@ -1,68 +0,0 @@
|
|||
def localProperties = new Properties()
|
||||
def localPropertiesFile = rootProject.file('local.properties')
|
||||
if (localPropertiesFile.exists()) {
|
||||
localPropertiesFile.withReader('UTF-8') { reader ->
|
||||
localProperties.load(reader)
|
||||
}
|
||||
}
|
||||
|
||||
def flutterRoot = localProperties.getProperty('flutter.sdk')
|
||||
if (flutterRoot == null) {
|
||||
throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
|
||||
}
|
||||
|
||||
def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
|
||||
if (flutterVersionCode == null) {
|
||||
flutterVersionCode = '1'
|
||||
}
|
||||
|
||||
def flutterVersionName = localProperties.getProperty('flutter.versionName')
|
||||
if (flutterVersionName == null) {
|
||||
flutterVersionName = '1.0'
|
||||
}
|
||||
|
||||
apply plugin: 'com.android.application'
|
||||
apply plugin: 'kotlin-android'
|
||||
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
|
||||
|
||||
android {
|
||||
compileSdkVersion 30
|
||||
|
||||
compileOptions {
|
||||
sourceCompatibility JavaVersion.VERSION_1_8
|
||||
targetCompatibility JavaVersion.VERSION_1_8
|
||||
}
|
||||
|
||||
kotlinOptions {
|
||||
jvmTarget = '1.8'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main.java.srcDirs += 'src/main/kotlin'
|
||||
}
|
||||
|
||||
defaultConfig {
|
||||
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
|
||||
applicationId "eu.simonbinder.moor_example.example"
|
||||
minSdkVersion 16
|
||||
targetSdkVersion 30
|
||||
versionCode flutterVersionCode.toInteger()
|
||||
versionName flutterVersionName
|
||||
}
|
||||
|
||||
buildTypes {
|
||||
release {
|
||||
// TODO: Add your own signing config for the release build.
|
||||
// Signing with the debug keys for now, so `flutter run --release` works.
|
||||
signingConfig signingConfigs.debug
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
flutter {
|
||||
source '../..'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="eu.simonbinder.moor_example.example">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
|
@ -1,41 +0,0 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="eu.simonbinder.moor_example.example">
|
||||
<application
|
||||
android:label="example"
|
||||
android:icon="@mipmap/ic_launcher">
|
||||
<activity
|
||||
android:name=".MainActivity"
|
||||
android:launchMode="singleTop"
|
||||
android:theme="@style/LaunchTheme"
|
||||
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
|
||||
android:hardwareAccelerated="true"
|
||||
android:windowSoftInputMode="adjustResize">
|
||||
<!-- Specifies an Android theme to apply to this Activity as soon as
|
||||
the Android process has started. This theme is visible to the user
|
||||
while the Flutter UI initializes. After that, this theme continues
|
||||
to determine the Window background behind the Flutter UI. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.NormalTheme"
|
||||
android:resource="@style/NormalTheme"
|
||||
/>
|
||||
<!-- Displays an Android View that continues showing the launch screen
|
||||
Drawable until Flutter paints its first frame, then this splash
|
||||
screen fades out. A splash screen is useful to avoid any visual
|
||||
gap between the end of Android's launch screen and the painting of
|
||||
Flutter's first frame. -->
|
||||
<meta-data
|
||||
android:name="io.flutter.embedding.android.SplashScreenDrawable"
|
||||
android:resource="@drawable/launch_background"
|
||||
/>
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN"/>
|
||||
<category android:name="android.intent.category.LAUNCHER"/>
|
||||
</intent-filter>
|
||||
</activity>
|
||||
<!-- Don't delete the meta-data below.
|
||||
This is used by the Flutter tool to generate GeneratedPluginRegistrant.java -->
|
||||
<meta-data
|
||||
android:name="flutterEmbedding"
|
||||
android:value="2" />
|
||||
</application>
|
||||
</manifest>
|
|
@ -1,6 +0,0 @@
|
|||
package eu.simonbinder.moor_example.example
|
||||
|
||||
import io.flutter.embedding.android.FlutterActivity
|
||||
|
||||
class MainActivity: FlutterActivity() {
|
||||
}
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="?android:colorBackground" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Modify this file to customize your launch splash screen -->
|
||||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<item android:drawable="@android:color/white" />
|
||||
|
||||
<!-- You can insert your own image assets here -->
|
||||
<!-- <item>
|
||||
<bitmap
|
||||
android:gravity="center"
|
||||
android:src="@mipmap/launch_image" />
|
||||
</item> -->
|
||||
</layer-list>
|
Before Width: | Height: | Size: 544 B |
Before Width: | Height: | Size: 442 B |
Before Width: | Height: | Size: 721 B |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.4 KiB |
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is on -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Black.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -1,18 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<!-- Theme applied to the Android Window while the process is starting when the OS's Dark Mode setting is off -->
|
||||
<style name="LaunchTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<!-- Show a splash screen on the activity. Automatically removed when
|
||||
Flutter draws its first frame -->
|
||||
<item name="android:windowBackground">@drawable/launch_background</item>
|
||||
</style>
|
||||
<!-- Theme applied to the Android Window as soon as the process has started.
|
||||
This theme determines the color of the Android Window while your
|
||||
Flutter UI initializes, as well as behind your Flutter UI while its
|
||||
running.
|
||||
|
||||
This Theme is only used starting with V2 of Flutter's Android embedding. -->
|
||||
<style name="NormalTheme" parent="@android:style/Theme.Light.NoTitleBar">
|
||||
<item name="android:windowBackground">?android:colorBackground</item>
|
||||
</style>
|
||||
</resources>
|
|
@ -1,7 +0,0 @@
|
|||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="eu.simonbinder.moor_example.example">
|
||||
<!-- Flutter needs it to communicate with the running application
|
||||
to allow setting breakpoints, to provide hot reload, etc.
|
||||
-->
|
||||
<uses-permission android:name="android.permission.INTERNET"/>
|
||||
</manifest>
|
|
@ -1,29 +0,0 @@
|
|||
buildscript {
|
||||
ext.kotlin_version = '1.3.50'
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
|
||||
dependencies {
|
||||
classpath 'com.android.tools.build:gradle:4.1.0'
|
||||
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
|
||||
}
|
||||
}
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
google()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
rootProject.buildDir = '../build'
|
||||
subprojects {
|
||||
project.buildDir = "${rootProject.buildDir}/${project.name}"
|
||||
project.evaluationDependsOn(':app')
|
||||
}
|
||||
|
||||
task clean(type: Delete) {
|
||||
delete rootProject.buildDir
|
||||
}
|
|
@ -1,3 +0,0 @@
|
|||
org.gradle.jvmargs=-Xmx1536M
|
||||
android.useAndroidX=true
|
||||
android.enableJetifier=true
|
|
@ -1,6 +0,0 @@
|
|||
#Fri Jun 23 08:50:38 CEST 2017
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.2-all.zip
|
|
@ -1,11 +0,0 @@
|
|||
include ':app'
|
||||
|
||||
def localPropertiesFile = new File(rootProject.projectDir, "local.properties")
|
||||
def properties = new Properties()
|
||||
|
||||
assert localPropertiesFile.exists()
|
||||
localPropertiesFile.withReader("UTF-8") { reader -> properties.load(reader) }
|
||||
|
||||
def flutterSdkPath = properties.getProperty("flutter.sdk")
|
||||
assert flutterSdkPath != null, "flutter.sdk not set in local.properties"
|
||||
apply from: "$flutterSdkPath/packages/flutter_tools/gradle/app_plugin_loader.gradle"
|
|
@ -1,6 +0,0 @@
|
|||
targets:
|
||||
$default:
|
||||
builders:
|
||||
moor_generator:
|
||||
options:
|
||||
compact_query_methods: true
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>App</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>io.flutter.flutter.app</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>App</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>FMWK</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>1.0</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>1.0</string>
|
||||
<key>MinimumOSVersion</key>
|
||||
<string>8.0</string>
|
||||
</dict>
|
||||
</plist>
|
|
@ -1 +0,0 @@
|
|||
#include "Generated.xcconfig"
|
|
@ -1 +0,0 @@
|
|||
#include "Generated.xcconfig"
|
|
@ -1,518 +0,0 @@
|
|||
// !$*UTF8*$!
|
||||
{
|
||||
archiveVersion = 1;
|
||||
classes = {
|
||||
};
|
||||
objectVersion = 46;
|
||||
objects = {
|
||||
|
||||
/* Begin PBXBuildFile section */
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */ = {isa = PBXBuildFile; fileRef = 1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */; };
|
||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */ = {isa = PBXBuildFile; fileRef = 2D5378251FAA1A9400D5DBA9 /* flutter_assets */; };
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */ = {isa = PBXBuildFile; fileRef = 3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */; };
|
||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; };
|
||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 3B80C3931E831B6300D905FE /* App.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74858FAE1ED2DC5600515810 /* AppDelegate.swift */; };
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; };
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 9740EEBA1CF902C7004384FC /* Flutter.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
|
||||
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */ = {isa = PBXBuildFile; fileRef = 9740EEB21CF90195004384FC /* Debug.xcconfig */; };
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FA1CF9000F007C117D /* Main.storyboard */; };
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FD1CF9000F007C117D /* Assets.xcassets */; };
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */ = {isa = PBXBuildFile; fileRef = 97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */; };
|
||||
/* End PBXBuildFile section */
|
||||
|
||||
/* Begin PBXCopyFilesBuildPhase section */
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */ = {
|
||||
isa = PBXCopyFilesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
dstPath = "";
|
||||
dstSubfolderSpec = 10;
|
||||
files = (
|
||||
3B80C3951E831B6300D905FE /* App.framework in Embed Frameworks */,
|
||||
9705A1C71CF904A300538489 /* Flutter.framework in Embed Frameworks */,
|
||||
);
|
||||
name = "Embed Frameworks";
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXCopyFilesBuildPhase section */
|
||||
|
||||
/* Begin PBXFileReference section */
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = GeneratedPluginRegistrant.h; sourceTree = "<group>"; };
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeneratedPluginRegistrant.m; sourceTree = "<group>"; };
|
||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */ = {isa = PBXFileReference; lastKnownFileType = folder; name = flutter_assets; path = Flutter/flutter_assets; sourceTree = SOURCE_ROOT; };
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = AppFrameworkInfo.plist; path = Flutter/AppFrameworkInfo.plist; sourceTree = "<group>"; };
|
||||
3B80C3931E831B6300D905FE /* App.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = App.framework; path = Flutter/App.framework; sourceTree = "<group>"; };
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Runner-Bridging-Header.h"; sourceTree = "<group>"; };
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; name = Release.xcconfig; path = Flutter/Release.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Debug.xcconfig; path = Flutter/Debug.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xcconfig; name = Generated.xcconfig; path = Flutter/Generated.xcconfig; sourceTree = "<group>"; };
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Flutter.framework; path = Flutter/Flutter.framework; sourceTree = "<group>"; };
|
||||
97C146EE1CF9000F007C117D /* Runner.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Runner.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
97C146FB1CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/Main.storyboard; sourceTree = "<group>"; };
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Assets.xcassets; sourceTree = "<group>"; };
|
||||
97C147001CF9000F007C117D /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.storyboard; name = Base; path = Base.lproj/LaunchScreen.storyboard; sourceTree = "<group>"; };
|
||||
97C147021CF9000F007C117D /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
|
||||
/* End PBXFileReference section */
|
||||
|
||||
/* Begin PBXFrameworksBuildPhase section */
|
||||
97C146EB1CF9000F007C117D /* Frameworks */ = {
|
||||
isa = PBXFrameworksBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
9705A1C61CF904A100538489 /* Flutter.framework in Frameworks */,
|
||||
3B80C3941E831B6300D905FE /* App.framework in Frameworks */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXFrameworksBuildPhase section */
|
||||
|
||||
/* Begin PBXGroup section */
|
||||
9740EEB11CF90186004384FC /* Flutter */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
2D5378251FAA1A9400D5DBA9 /* flutter_assets */,
|
||||
3B80C3931E831B6300D905FE /* App.framework */,
|
||||
3B3967151E833CAA004F5970 /* AppFrameworkInfo.plist */,
|
||||
9740EEBA1CF902C7004384FC /* Flutter.framework */,
|
||||
9740EEB21CF90195004384FC /* Debug.xcconfig */,
|
||||
7AFA3C8E1D35360C0083082E /* Release.xcconfig */,
|
||||
9740EEB31CF90195004384FC /* Generated.xcconfig */,
|
||||
);
|
||||
name = Flutter;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146E51CF9000F007C117D = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
9740EEB11CF90186004384FC /* Flutter */,
|
||||
97C146F01CF9000F007C117D /* Runner */,
|
||||
97C146EF1CF9000F007C117D /* Products */,
|
||||
);
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146EF1CF9000F007C117D /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146EE1CF9000F007C117D /* Runner.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F01CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */,
|
||||
97C146FD1CF9000F007C117D /* Assets.xcassets */,
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */,
|
||||
97C147021CF9000F007C117D /* Info.plist */,
|
||||
97C146F11CF9000F007C117D /* Supporting Files */,
|
||||
1498D2321E8E86230040F4C2 /* GeneratedPluginRegistrant.h */,
|
||||
1498D2331E8E89220040F4C2 /* GeneratedPluginRegistrant.m */,
|
||||
74858FAE1ED2DC5600515810 /* AppDelegate.swift */,
|
||||
74858FAD1ED2DC5600515810 /* Runner-Bridging-Header.h */,
|
||||
);
|
||||
path = Runner;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146F11CF9000F007C117D /* Supporting Files */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
);
|
||||
name = "Supporting Files";
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXGroup section */
|
||||
|
||||
/* Begin PBXNativeTarget section */
|
||||
97C146ED1CF9000F007C117D /* Runner */ = {
|
||||
isa = PBXNativeTarget;
|
||||
buildConfigurationList = 97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */;
|
||||
buildPhases = (
|
||||
9740EEB61CF901F6004384FC /* Run Script */,
|
||||
97C146EA1CF9000F007C117D /* Sources */,
|
||||
97C146EB1CF9000F007C117D /* Frameworks */,
|
||||
97C146EC1CF9000F007C117D /* Resources */,
|
||||
9705A1C41CF9048500538489 /* Embed Frameworks */,
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */,
|
||||
);
|
||||
buildRules = (
|
||||
);
|
||||
dependencies = (
|
||||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 97C146EE1CF9000F007C117D /* Runner.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
||||
/* Begin PBXProject section */
|
||||
97C146E61CF9000F007C117D /* Project object */ = {
|
||||
isa = PBXProject;
|
||||
attributes = {
|
||||
LastUpgradeCheck = 0910;
|
||||
ORGANIZATIONNAME = "The Chromium Authors";
|
||||
TargetAttributes = {
|
||||
97C146ED1CF9000F007C117D = {
|
||||
CreatedOnToolsVersion = 7.3.1;
|
||||
LastSwiftMigration = 0910;
|
||||
};
|
||||
};
|
||||
};
|
||||
buildConfigurationList = 97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */;
|
||||
compatibilityVersion = "Xcode 3.2";
|
||||
developmentRegion = English;
|
||||
hasScannedForEncodings = 0;
|
||||
knownRegions = (
|
||||
en,
|
||||
Base,
|
||||
);
|
||||
mainGroup = 97C146E51CF9000F007C117D;
|
||||
productRefGroup = 97C146EF1CF9000F007C117D /* Products */;
|
||||
projectDirPath = "";
|
||||
projectRoot = "";
|
||||
targets = (
|
||||
97C146ED1CF9000F007C117D /* Runner */,
|
||||
);
|
||||
};
|
||||
/* End PBXProject section */
|
||||
|
||||
/* Begin PBXResourcesBuildPhase section */
|
||||
97C146EC1CF9000F007C117D /* Resources */ = {
|
||||
isa = PBXResourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
97C147011CF9000F007C117D /* LaunchScreen.storyboard in Resources */,
|
||||
3B3967161E833CAA004F5970 /* AppFrameworkInfo.plist in Resources */,
|
||||
9740EEB41CF90195004384FC /* Debug.xcconfig in Resources */,
|
||||
97C146FE1CF9000F007C117D /* Assets.xcassets in Resources */,
|
||||
2D5378261FAA1A9400D5DBA9 /* flutter_assets in Resources */,
|
||||
97C146FC1CF9000F007C117D /* Main.storyboard in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXResourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXShellScriptBuildPhase section */
|
||||
3B06AD1E1E4923F5004D2608 /* Thin Binary */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Thin Binary";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" thin";
|
||||
};
|
||||
9740EEB61CF901F6004384FC /* Run Script */ = {
|
||||
isa = PBXShellScriptBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
);
|
||||
inputPaths = (
|
||||
);
|
||||
name = "Run Script";
|
||||
outputPaths = (
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
shellPath = /bin/sh;
|
||||
shellScript = "/bin/sh \"$FLUTTER_ROOT/packages/flutter_tools/bin/xcode_backend.sh\" build";
|
||||
};
|
||||
/* End PBXShellScriptBuildPhase section */
|
||||
|
||||
/* Begin PBXSourcesBuildPhase section */
|
||||
97C146EA1CF9000F007C117D /* Sources */ = {
|
||||
isa = PBXSourcesBuildPhase;
|
||||
buildActionMask = 2147483647;
|
||||
files = (
|
||||
74858FAF1ED2DC5600515810 /* AppDelegate.swift in Sources */,
|
||||
1498D2341E8E89220040F4C2 /* GeneratedPluginRegistrant.m in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
/* End PBXSourcesBuildPhase section */
|
||||
|
||||
/* Begin PBXVariantGroup section */
|
||||
97C146FA1CF9000F007C117D /* Main.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C146FB1CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = Main.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
97C146FF1CF9000F007C117D /* LaunchScreen.storyboard */ = {
|
||||
isa = PBXVariantGroup;
|
||||
children = (
|
||||
97C147001CF9000F007C117D /* Base */,
|
||||
);
|
||||
name = LaunchScreen.storyboard;
|
||||
sourceTree = "<group>";
|
||||
};
|
||||
/* End PBXVariantGroup section */
|
||||
|
||||
/* Begin XCBuildConfiguration section */
|
||||
249021D3217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
249021D4217E4FDB00AE95B9 /* Profile */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
DEVELOPMENT_TEAM = S8QB4VV633;
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = eu.simonbinder.moor_example.moorExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_VERSION = 4.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Profile;
|
||||
};
|
||||
97C147031CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = dwarf;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
ENABLE_TESTABILITY = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_DYNAMIC_NO_PIC = NO;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_OPTIMIZATION_LEVEL = 0;
|
||||
GCC_PREPROCESSOR_DEFINITIONS = (
|
||||
"DEBUG=1",
|
||||
"$(inherited)",
|
||||
);
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = YES;
|
||||
ONLY_ACTIVE_ARCH = YES;
|
||||
SDKROOT = iphoneos;
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147041CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ALWAYS_SEARCH_USER_PATHS = NO;
|
||||
CLANG_ANALYZER_NONNULL = YES;
|
||||
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
|
||||
CLANG_CXX_LIBRARY = "libc++";
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CLANG_ENABLE_OBJC_ARC = YES;
|
||||
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
|
||||
CLANG_WARN_BOOL_CONVERSION = YES;
|
||||
CLANG_WARN_COMMA = YES;
|
||||
CLANG_WARN_CONSTANT_CONVERSION = YES;
|
||||
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
|
||||
CLANG_WARN_EMPTY_BODY = YES;
|
||||
CLANG_WARN_ENUM_CONVERSION = YES;
|
||||
CLANG_WARN_INFINITE_RECURSION = YES;
|
||||
CLANG_WARN_INT_CONVERSION = YES;
|
||||
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
|
||||
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
|
||||
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
|
||||
CLANG_WARN_STRICT_PROTOTYPES = YES;
|
||||
CLANG_WARN_SUSPICIOUS_MOVE = YES;
|
||||
CLANG_WARN_UNREACHABLE_CODE = YES;
|
||||
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
|
||||
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
|
||||
COPY_PHASE_STRIP = NO;
|
||||
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
|
||||
ENABLE_NS_ASSERTIONS = NO;
|
||||
ENABLE_STRICT_OBJC_MSGSEND = YES;
|
||||
GCC_C_LANGUAGE_STANDARD = gnu99;
|
||||
GCC_NO_COMMON_BLOCKS = YES;
|
||||
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
|
||||
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
|
||||
GCC_WARN_UNDECLARED_SELECTOR = YES;
|
||||
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
|
||||
GCC_WARN_UNUSED_FUNCTION = YES;
|
||||
GCC_WARN_UNUSED_VARIABLE = YES;
|
||||
IPHONEOS_DEPLOYMENT_TARGET = 8.0;
|
||||
MTL_ENABLE_DEBUG_INFO = NO;
|
||||
SDKROOT = iphoneos;
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
|
||||
TARGETED_DEVICE_FAMILY = "1,2";
|
||||
VALIDATE_PRODUCT = YES;
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
97C147061CF9000F007C117D /* Debug */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 9740EEB21CF90195004384FC /* Debug.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = eu.simonbinder.moor_example.moorExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = On;
|
||||
SWIFT_VERSION = 4.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Debug;
|
||||
};
|
||||
97C147071CF9000F007C117D /* Release */ = {
|
||||
isa = XCBuildConfiguration;
|
||||
baseConfigurationReference = 7AFA3C8E1D35360C0083082E /* Release.xcconfig */;
|
||||
buildSettings = {
|
||||
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
|
||||
CLANG_ENABLE_MODULES = YES;
|
||||
CURRENT_PROJECT_VERSION = "$(FLUTTER_BUILD_NUMBER)";
|
||||
ENABLE_BITCODE = NO;
|
||||
FRAMEWORK_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
INFOPLIST_FILE = Runner/Info.plist;
|
||||
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks";
|
||||
LIBRARY_SEARCH_PATHS = (
|
||||
"$(inherited)",
|
||||
"$(PROJECT_DIR)/Flutter",
|
||||
);
|
||||
PRODUCT_BUNDLE_IDENTIFIER = eu.simonbinder.moor_example.moorExample;
|
||||
PRODUCT_NAME = "$(TARGET_NAME)";
|
||||
SWIFT_OBJC_BRIDGING_HEADER = "Runner/Runner-Bridging-Header.h";
|
||||
SWIFT_SWIFT3_OBJC_INFERENCE = On;
|
||||
SWIFT_VERSION = 4.0;
|
||||
VERSIONING_SYSTEM = "apple-generic";
|
||||
};
|
||||
name = Release;
|
||||
};
|
||||
/* End XCBuildConfiguration section */
|
||||
|
||||
/* Begin XCConfigurationList section */
|
||||
97C146E91CF9000F007C117D /* Build configuration list for PBXProject "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147031CF9000F007C117D /* Debug */,
|
||||
97C147041CF9000F007C117D /* Release */,
|
||||
249021D3217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
97C147051CF9000F007C117D /* Build configuration list for PBXNativeTarget "Runner" */ = {
|
||||
isa = XCConfigurationList;
|
||||
buildConfigurations = (
|
||||
97C147061CF9000F007C117D /* Debug */,
|
||||
97C147071CF9000F007C117D /* Release */,
|
||||
249021D4217E4FDB00AE95B9 /* Profile */,
|
||||
);
|
||||
defaultConfigurationIsVisible = 0;
|
||||
defaultConfigurationName = Release;
|
||||
};
|
||||
/* End XCConfigurationList section */
|
||||
|
||||
};
|
||||
rootObject = 97C146E61CF9000F007C117D /* Project object */;
|
||||
}
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -1,93 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Scheme
|
||||
LastUpgradeVersion = "0910"
|
||||
version = "1.3">
|
||||
<BuildAction
|
||||
parallelizeBuildables = "YES"
|
||||
buildImplicitDependencies = "YES">
|
||||
<BuildActionEntries>
|
||||
<BuildActionEntry
|
||||
buildForTesting = "YES"
|
||||
buildForRunning = "YES"
|
||||
buildForProfiling = "YES"
|
||||
buildForArchiving = "YES"
|
||||
buildForAnalyzing = "YES">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildActionEntry>
|
||||
</BuildActionEntries>
|
||||
</BuildAction>
|
||||
<TestAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
shouldUseLaunchSchemeArgsEnv = "YES">
|
||||
<Testables>
|
||||
</Testables>
|
||||
<MacroExpansion>
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</MacroExpansion>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</TestAction>
|
||||
<LaunchAction
|
||||
buildConfiguration = "Debug"
|
||||
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
|
||||
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
|
||||
language = ""
|
||||
launchStyle = "0"
|
||||
useCustomWorkingDirectory = "NO"
|
||||
ignoresPersistentStateOnLaunch = "NO"
|
||||
debugDocumentVersioning = "YES"
|
||||
debugServiceExtension = "internal"
|
||||
allowLocationSimulation = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
<AdditionalOptions>
|
||||
</AdditionalOptions>
|
||||
</LaunchAction>
|
||||
<ProfileAction
|
||||
buildConfiguration = "Profile"
|
||||
shouldUseLaunchSchemeArgsEnv = "YES"
|
||||
savedToolIdentifier = ""
|
||||
useCustomWorkingDirectory = "NO"
|
||||
debugDocumentVersioning = "YES">
|
||||
<BuildableProductRunnable
|
||||
runnableDebuggingMode = "0">
|
||||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "97C146ED1CF9000F007C117D"
|
||||
BuildableName = "Runner.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
</BuildableProductRunnable>
|
||||
</ProfileAction>
|
||||
<AnalyzeAction
|
||||
buildConfiguration = "Debug">
|
||||
</AnalyzeAction>
|
||||
<ArchiveAction
|
||||
buildConfiguration = "Release"
|
||||
revealArchiveInOrganizer = "YES">
|
||||
</ArchiveAction>
|
||||
</Scheme>
|
|
@ -1,7 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Workspace
|
||||
version = "1.0">
|
||||
<FileRef
|
||||
location = "group:Runner.xcodeproj">
|
||||
</FileRef>
|
||||
</Workspace>
|
|
@ -1,13 +0,0 @@
|
|||
import UIKit
|
||||
import Flutter
|
||||
|
||||
@UIApplicationMain
|
||||
@objc class AppDelegate: FlutterAppDelegate {
|
||||
override func application(
|
||||
_ application: UIApplication,
|
||||
didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?
|
||||
) -> Bool {
|
||||
GeneratedPluginRegistrant.register(with: self)
|
||||
return super.application(application, didFinishLaunchingWithOptions: launchOptions)
|
||||
}
|
||||
}
|
|
@ -1,122 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-20x20@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-29x29@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-40x40@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "60x60",
|
||||
"idiom" : "iphone",
|
||||
"filename" : "Icon-App-60x60@3x.png",
|
||||
"scale" : "3x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "20x20",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-20x20@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "29x29",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-29x29@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "40x40",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-40x40@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@1x.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"size" : "76x76",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-76x76@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "83.5x83.5",
|
||||
"idiom" : "ipad",
|
||||
"filename" : "Icon-App-83.5x83.5@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"size" : "1024x1024",
|
||||
"idiom" : "ios-marketing",
|
||||
"filename" : "Icon-App-1024x1024@1x.png",
|
||||
"scale" : "1x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 11 KiB |
Before Width: | Height: | Size: 564 B |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.6 KiB |
Before Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1.7 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.9 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 2.6 KiB |
Before Width: | Height: | Size: 3.7 KiB |
Before Width: | Height: | Size: 1.8 KiB |
Before Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 3.5 KiB |
|
@ -1,23 +0,0 @@
|
|||
{
|
||||
"images" : [
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage.png",
|
||||
"scale" : "1x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@2x.png",
|
||||
"scale" : "2x"
|
||||
},
|
||||
{
|
||||
"idiom" : "universal",
|
||||
"filename" : "LaunchImage@3x.png",
|
||||
"scale" : "3x"
|
||||
}
|
||||
],
|
||||
"info" : {
|
||||
"version" : 1,
|
||||
"author" : "xcode"
|
||||
}
|
||||
}
|
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
Before Width: | Height: | Size: 68 B |
|
@ -1,5 +0,0 @@
|
|||
# Launch Screen Assets
|
||||
|
||||
You can customize the launch screen with your own desired assets by replacing the image files in this directory.
|
||||
|
||||
You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
|
|
@ -1,37 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="12121" systemVersion="16G29" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" colorMatched="YES" initialViewController="01J-lp-oVM">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="12089"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--View Controller-->
|
||||
<scene sceneID="EHf-IW-A2E">
|
||||
<objects>
|
||||
<viewController id="01J-lp-oVM" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="Ydg-fD-yQy"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="xbc-2k-c8Z"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<subviews>
|
||||
<imageView opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" image="LaunchImage" translatesAutoresizingMaskIntoConstraints="NO" id="YRO-k0-Ey4">
|
||||
</imageView>
|
||||
</subviews>
|
||||
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
||||
<constraints>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerX" secondItem="Ze5-6b-2t3" secondAttribute="centerX" id="1a2-6s-vTC"/>
|
||||
<constraint firstItem="YRO-k0-Ey4" firstAttribute="centerY" secondItem="Ze5-6b-2t3" secondAttribute="centerY" id="4X2-HB-R7a"/>
|
||||
</constraints>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
<point key="canvasLocation" x="53" y="375"/>
|
||||
</scene>
|
||||
</scenes>
|
||||
<resources>
|
||||
<image name="LaunchImage" width="168" height="185"/>
|
||||
</resources>
|
||||
</document>
|
|
@ -1,26 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="10117" systemVersion="15F34" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" initialViewController="BYZ-38-t0r">
|
||||
<dependencies>
|
||||
<deployment identifier="iOS"/>
|
||||
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
|
||||
</dependencies>
|
||||
<scenes>
|
||||
<!--Flutter View Controller-->
|
||||
<scene sceneID="tne-QT-ifu">
|
||||
<objects>
|
||||
<viewController id="BYZ-38-t0r" customClass="FlutterViewController" sceneMemberID="viewController">
|
||||
<layoutGuides>
|
||||
<viewControllerLayoutGuide type="top" id="y3c-jy-aDJ"/>
|
||||
<viewControllerLayoutGuide type="bottom" id="wfy-db-euE"/>
|
||||
</layoutGuides>
|
||||
<view key="view" contentMode="scaleToFill" id="8bC-Xf-vdC">
|
||||
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
|
||||
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
|
||||
</view>
|
||||
</viewController>
|
||||
<placeholder placeholderIdentifier="IBFirstResponder" id="dkx-z0-nzr" sceneMemberID="firstResponder"/>
|
||||
</objects>
|
||||
</scene>
|
||||
</scenes>
|
||||
</document>
|
|
@ -1,45 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>CFBundleDevelopmentRegion</key>
|
||||
<string>en</string>
|
||||
<key>CFBundleExecutable</key>
|
||||
<string>$(EXECUTABLE_NAME)</string>
|
||||
<key>CFBundleIdentifier</key>
|
||||
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
|
||||
<key>CFBundleInfoDictionaryVersion</key>
|
||||
<string>6.0</string>
|
||||
<key>CFBundleName</key>
|
||||
<string>moor_example</string>
|
||||
<key>CFBundlePackageType</key>
|
||||
<string>APPL</string>
|
||||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(FLUTTER_BUILD_NAME)</string>
|
||||
<key>CFBundleSignature</key>
|
||||
<string>????</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>$(FLUTTER_BUILD_NUMBER)</string>
|
||||
<key>LSRequiresIPhoneOS</key>
|
||||
<true/>
|
||||
<key>UILaunchStoryboardName</key>
|
||||
<string>LaunchScreen</string>
|
||||
<key>UIMainStoryboardFile</key>
|
||||
<string>Main</string>
|
||||
<key>UISupportedInterfaceOrientations</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UISupportedInterfaceOrientations~ipad</key>
|
||||
<array>
|
||||
<string>UIInterfaceOrientationPortrait</string>
|
||||
<string>UIInterfaceOrientationPortraitUpsideDown</string>
|
||||
<string>UIInterfaceOrientationLandscapeLeft</string>
|
||||
<string>UIInterfaceOrientationLandscapeRight</string>
|
||||
</array>
|
||||
<key>UIViewControllerBasedStatusBarAppearance</key>
|
||||
<false/>
|
||||
</dict>
|
||||
</plist>
|