This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter_ebook_shop_app/utils/constants.dart'; | |
import 'package:sqflite/sqflite.dart' as sql; | |
import 'package:path/path.dart' as path; | |
/* | |
* Created by AbedElaziz Shehadeh on 1st March, 2020 | |
* elaziz.shehadeh@gmail.com | |
*/ | |
class DBHelper { | |
static final DBHelper _instance = DBHelper._internal(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<manifest xmlns:android="http://schemas.android.com/apk/res/android" | |
package="com.abedelazizshe.flutter_lottie_splash_app"> | |
<!-- io.flutter.app.FlutterApplication is an android.app.Application that | |
calls FlutterMain.startInitialization(this); in its onCreate method. | |
In most cases you can leave this as-is, but you if you want to provide | |
additional functionality it is fine to subclass or reimplement | |
FlutterApplication and put your custom class here. --> | |
<application | |
android:name="io.flutter.app.FlutterApplication" | |
android:label="flutter_lottie_splash_app" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="utf-8"?> | |
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent"> | |
<com.airbnb.lottie.LottieAnimationView | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
app:layout_constraintBottom_toBottomOf="parent" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import android.content.Context | |
import android.os.Bundle | |
import android.view.LayoutInflater | |
import android.view.View | |
import io.flutter.embedding.android.SplashScreen | |
class SplashView : SplashScreen { | |
override fun createSplashView(context: Context, savedInstanceState: Bundle?): View? = | |
LayoutInflater.from(context).inflate(R.layout.splash_view, null, false) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import io.flutter.embedding.android.FlutterActivity | |
import io.flutter.embedding.android.SplashScreen | |
class MainActivity: FlutterActivity() { | |
override fun provideSplashScreen(): SplashScreen? = SplashView() | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Flutter | |
@UIApplicationMain | |
@objc class AppDelegate: FlutterAppDelegate { | |
lazy var flutterEngine = FlutterEngine(name: "MyApp") | |
override func application( | |
_ application: UIApplication, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import UIKit | |
import Lottie | |
public class SplashViewController: UIViewController { | |
private var animationView: AnimationView? | |
public override func viewDidAppear(_ animated: Bool) { | |
animationView = .init(name: "splash_screen") | |
animationView!.frame = view.bounds |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:domain/src/models/article/article_model.dart'; | |
abstract class ArticlesRepository { | |
Future<List<ArticleModel>> getMostEmailedArticles(); | |
Future<List<ArticleModel>> getMostViewedArticles(); | |
Future<List<ArticleModel>> getMostSharedArticles(); | |
Future<int> saveArticles(String articles, String type); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:domain/domain.dart'; | |
import 'package:injectable/injectable.dart'; | |
@singleton | |
class GetArticlesUseCase { | |
GetArticlesUseCase(this.articlesRepository); | |
final ArticlesRepository articlesRepository; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:domain/domain.dart'; | |
import 'package:flutter_test/flutter_test.dart'; | |
import 'package:mockito/annotations.dart'; | |
import 'package:mockito/mockito.dart'; | |
import '../../mock/mock_article_model.dart'; | |
import 'get_articles_use_case_test.mocks.dart'; |
OlderNewer