aloisdeniel/dioc

Container conflicts with flutter/material.dart

Closed this issue · 1 comments

implementing for Flutter and getting this error in main.dart that imports flutter/material.dart

error: The name 'Container' is defined in the libraries 'container.dart' and 'container.dart'.

Any ideas on how to resolve without removing flutter/material.dart?

You can specify a library prefix for that use case :

import 'package:dioc/dioc.dart' as dioc;

final container = dioc.Container();