Giter Site home page Giter Site logo

devmuaz / flutter-clean-architecture Goto Github PK

View Code? Open in Web Editor NEW
507.0 11.0 143.0 3.93 MB

A flutter clean architecture series, the way we build clean apps.

License: MIT License

Kotlin 0.42% Ruby 3.98% Swift 1.19% Objective-C 0.11% Dart 94.30%
flutter clean-architecture clean-code retrofit floor rest-api

flutter-clean-architecture's People

Contributors

devmuaz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

flutter-clean-architecture's Issues

Imports of core package into domain package.

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 ).

build error

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

DioError does not work with the new version of Dio:

  1. "request" renamed to requestOptions
  2. DioErrorType.RESPONSE -> DioErrorType.response

It is no good idea to use DioError in DataState I think. HTTP 403/404/500 etc.. is not a Dio error in fact.

Some new useful packages

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.