devmuaz / flutter-clean-architecture Goto Github PK
View Code? Open in Web Editor NEWA flutter clean architecture series, the way we build clean apps.
License: MIT License
A flutter clean architecture series, the way we build clean apps.
License: MIT License
In the domain package you have some imports from the core package ( in usecases and repositories folders ). The main advantage of the hexagonal architecture is explicitly to avoid such imports.
The problem here is that the ports aren't part of the domain but of the application layer ( core package ).
Xcode's output:
โณ
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:63:33: Error: The getter 'addressOf' isn't defined for the class 'Utf8'.
- 'Utf8' is from 'package:ffi/src/utf8.dart' ('../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart').
Try correcting the name to the name of an existing getter, or defining a getter or field named 'addressOf'.
String toString() => fromUtf8(addressOf);
^^^^^^^^^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf16.dart:16:7: Error: Struct 'Utf16' is empty. Empty structs and unions are undefined behavior.
class Utf16 extends Struct {
^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/utf8.dart:23:7: Error: Struct 'Utf8' is empty. Empty structs and unions are undefined behavior.
class Utf8 extends Struct {
^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:14:7: Error: Struct 'sqlite3_context' is empty. Empty structs and unions are undefined behavior.
class sqlite3_context extends Struct {}
^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:12:7: Error: Struct 'sqlite3_value' is empty. Empty structs and unions are undefined behavior.
class sqlite3_value extends Struct {}
^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:10:7: Error: Struct 'sqlite3_stmt' is empty. Empty structs and unions are undefined behavior.
class sqlite3_stmt extends Struct {}
^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:8:7: Error: Struct 'sqlite3' is empty. Empty structs and unions are undefined behavior.
class sqlite3 extends Struct {}
^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/sqlite3-0.1.8/lib/src/ffi/sqlite3.ffi.dart:6:7: Error: Struct 'char' is empty. Empty structs and unions are undefined behavior.
class char extends Struct {}
^
../../development/flutter2.5.3/flutter/.pub-cache/hosted/pub.dartlang.org/ffi-0.1.3/lib/src/allocation.dart:47:33: Error: Expected type 'T' to be a valid and instantiated subtype of 'NativeType'.
final int totalSize = count * sizeOf();
^
Failed to package /Users/charlesyeh15/Downloads/flutter_clean_architecture-part3_local_data.
Command PhaseScriptExecution failed with a nonzero exit code
note: Using new build system
note: Planning
note: Build preparation complete
note: Building targets in dependency order
/Users/charlesyeh15/Downloads/flutter_clean_architecture-part3_local_data/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 8.0, but the range of supported deployment target versions is 9.0 to 15.2.99. (in target 'FMDB' from project 'Pods')
Could not build the application for the simulator.
Error launching application on iPhone 8.
DioError does not work with the new version of Dio:
It is no good idea to use DioError in DataState I think. HTTP 403/404/500 etc.. is not a Dio error in fact.
I am reading your medium articles and checking your code so I thought that you might be able to make the code cleaner by using freezed
instead of the regular class generated with the VSCode extensions.
Which will need a few tweaks in order to implement it cause you are already using the build runner
Thanks for the great articles and example code!
My system uses Token Authentication in which an user token is attend to the Http Request header. How would you recommend migrating the example to place this in the header rather than using the APIKey?
Thank you,
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.