Back

not able use this two package in same file appwrite/appwrite.dart; appwrite/models.dart;

  • 0
  • Flutter
conqueror
7 May, 2023, 16:28

importing this two file is giving error , import 'package:appwrite/appwrite.dart'; import 'package:appwrite/models.dart';

TL;DR
If you are experiencing an error while importing the two packages 'appwrite/appwrite.dart' and 'appwrite/models.dart' in the same file, you can try using aliases. Add the following line to your code: import 'package:Appwrite/models.dart as models; Then, you can use it like 'models.Account' to avoid conflicts between the two packages.
Drake
7 May, 2023, 17:33

You can alias imports like:

TypeScript
import 'package:Appwrite/models.dart as models;

And then use it like models.Account

conqueror
7 May, 2023, 17:34

ok, working fine.

Guille
8 May, 2023, 14:12

If your question was answered, can you please set this message as [SOLVED]?

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more