Moor: Column class clashes with Flutter

Created on 26 Apr 2019  路  1Comment  路  Source: simolus3/moor

The name 'Column' is defined in the libraries 'package:flutter/src/widgets/basic.dart' and 'package:moor/src/dsl/columns.dart'.dart(ambiguous_import)

Most helpful comment

I see. If you change the import to

import 'package:moor_flutter/moor_flutter.dart' hide Column;

It should fix the problem, as you'll most likely won't be using the Column class from moor directly.

An alternative would be to put the database and the widget code in different files, so that no dart file imports both moor and flutter.

Let me know if that doesn't fix the issue, thanks!

>All comments

I see. If you change the import to

import 'package:moor_flutter/moor_flutter.dart' hide Column;

It should fix the problem, as you'll most likely won't be using the Column class from moor directly.

An alternative would be to put the database and the widget code in different files, so that no dart file imports both moor and flutter.

Let me know if that doesn't fix the issue, thanks!

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tony123S picture tony123S  路  4Comments

Ltei picture Ltei  路  3Comments

cadaniel picture cadaniel  路  4Comments

novas1r1 picture novas1r1  路  4Comments

jerryzhoujw picture jerryzhoujw  路  4Comments