├── ios
├── Flutter
│ ├── Debug.xcconfig
│ ├── Release.xcconfig
│ └── AppFrameworkInfo.plist
├── Runner
│ ├── Runner-Bridging-Header.h
│ ├── Assets.xcassets
│ │ ├── LaunchImage.imageset
│ │ │ ├── LaunchImage.png
│ │ │ ├── LaunchImage@2x.png
│ │ │ ├── LaunchImage@3x.png
│ │ │ ├── README.md
│ │ │ └── Contents.json
│ │ └── AppIcon.appiconset
│ │ │ ├── Icon-App-20x20@1x.png
│ │ │ ├── Icon-App-20x20@2x.png
│ │ │ ├── Icon-App-20x20@3x.png
│ │ │ ├── Icon-App-29x29@1x.png
│ │ │ ├── Icon-App-29x29@2x.png
│ │ │ ├── Icon-App-29x29@3x.png
│ │ │ ├── Icon-App-40x40@1x.png
│ │ │ ├── Icon-App-40x40@2x.png
│ │ │ ├── Icon-App-40x40@3x.png
│ │ │ ├── Icon-App-60x60@2x.png
│ │ │ ├── Icon-App-60x60@3x.png
│ │ │ ├── Icon-App-76x76@1x.png
│ │ │ ├── Icon-App-76x76@2x.png
│ │ │ ├── Icon-App-1024x1024@1x.png
│ │ │ ├── Icon-App-83.5x83.5@2x.png
│ │ │ └── Contents.json
│ ├── AppDelegate.swift
│ ├── Base.lproj
│ │ ├── Main.storyboard
│ │ └── LaunchScreen.storyboard
│ └── Info.plist
├── Runner.xcworkspace
│ └── contents.xcworkspacedata
├── Runner.xcodeproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ ├── xcshareddata
│ │ └── xcschemes
│ │ │ └── Runner.xcscheme
│ └── project.pbxproj
└── .gitignore
├── screenshots
├── screenshot01.png
├── screenshot02.png
└── screenshot03.png
├── android
├── gradle.properties
├── .gitignore
├── app
│ ├── src
│ │ ├── main
│ │ │ ├── res
│ │ │ │ ├── mipmap-hdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-mdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── mipmap-xxxhdpi
│ │ │ │ │ └── ic_launcher.png
│ │ │ │ ├── values
│ │ │ │ │ └── styles.xml
│ │ │ │ └── drawable
│ │ │ │ │ └── launch_background.xml
│ │ │ ├── kotlin
│ │ │ │ └── com
│ │ │ │ │ └── example
│ │ │ │ │ └── desafio_github_search_09112019
│ │ │ │ │ └── MainActivity.kt
│ │ │ └── AndroidManifest.xml
│ │ ├── debug
│ │ │ └── AndroidManifest.xml
│ │ └── profile
│ │ │ └── AndroidManifest.xml
│ └── build.gradle
├── gradle
│ └── wrapper
│ │ └── gradle-wrapper.properties
├── settings.gradle
└── build.gradle
├── lib
├── app
│ ├── app_bloc.dart
│ ├── pages
│ │ ├── github_page
│ │ │ ├── github_page_bloc.dart
│ │ │ ├── github_page_module.dart
│ │ │ └── github_page_page.dart
│ │ ├── usuarios
│ │ │ ├── widgets
│ │ │ │ └── card_github
│ │ │ │ │ ├── card_github_bloc.dart
│ │ │ │ │ └── card_github_widget.dart
│ │ │ ├── usuarios_module.dart
│ │ │ ├── repositories
│ │ │ │ └── github_repository.dart
│ │ │ ├── usuarios_bloc.dart
│ │ │ ├── models
│ │ │ │ ├── github_list_model.dart
│ │ │ │ └── github_model.dart
│ │ │ └── usuarios_page.dart
│ │ └── dados_perfil
│ │ │ ├── repositories
│ │ │ └── dados_perfil_repository.dart
│ │ │ ├── dados_perfil_module.dart
│ │ │ ├── dados_perfil_bloc.dart
│ │ │ ├── models
│ │ │ ├── owner_model.dart
│ │ │ └── repos_model.dart
│ │ │ └── dados_perfil_page.dart
│ ├── shared
│ │ └── componenents
│ │ │ └── button_animation
│ │ │ ├── button_animation_bloc.dart
│ │ │ └── button_animation.dart
│ ├── app_module.dart
│ └── app_widget.dart
└── main.dart
├── .metadata
├── .gitignore
├── test
└── widget_test.dart
├── README.md
├── pubspec.yaml
└── pubspec.lock
/ios/Flutter/Debug.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Flutter/Release.xcconfig:
--------------------------------------------------------------------------------
1 | #include "Generated.xcconfig"
2 |
--------------------------------------------------------------------------------
/ios/Runner/Runner-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | #import "GeneratedPluginRegistrant.h"
--------------------------------------------------------------------------------
/screenshots/screenshot01.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/screenshots/screenshot01.png
--------------------------------------------------------------------------------
/screenshots/screenshot02.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/screenshots/screenshot02.png
--------------------------------------------------------------------------------
/screenshots/screenshot03.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/screenshots/screenshot03.png
--------------------------------------------------------------------------------
/android/gradle.properties:
--------------------------------------------------------------------------------
1 | org.gradle.jvmargs=-Xmx1536M
2 | android.enableR8=true
3 | android.useAndroidX=true
4 | android.enableJetifier=true
5 |
--------------------------------------------------------------------------------
/android/.gitignore:
--------------------------------------------------------------------------------
1 | gradle-wrapper.jar
2 | /.gradle
3 | /captures/
4 | /gradlew
5 | /gradlew.bat
6 | /local.properties
7 | GeneratedPluginRegistrant.java
8 |
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-hdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/android/app/src/main/res/mipmap-hdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-mdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/android/app/src/main/res/mipmap-mdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/LaunchImage.imageset/LaunchImage@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-20x20@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-29x29@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-40x40@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-60x60@3x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-76x76@2x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-1024x1024@1x.png
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Flutterando/github_search/HEAD/ios/Runner/Assets.xcassets/AppIcon.appiconset/Icon-App-83.5x83.5@2x.png
--------------------------------------------------------------------------------
/ios/Runner.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/app/app_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 |
3 | class AppBloc extends Disposable {
4 | //dispose will be called automatically by closing its streams
5 | @override
6 | void dispose() {}
7 | }
8 |
--------------------------------------------------------------------------------
/lib/main.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:desafio_github/app/app_module.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | void main() => runApp(ModularWidget(module: AppModule()));
6 |
--------------------------------------------------------------------------------
/ios/Runner.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/lib/app/pages/github_page/github_page_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 |
3 | class GithubPageBloc extends Disposable {
4 | //dispose will be called automatically by closing its streams
5 | @override
6 | void dispose() {}
7 | }
8 |
--------------------------------------------------------------------------------
/lib/app/pages/usuarios/widgets/card_github/card_github_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 |
3 | class CardGithubBloc extends Disposable {
4 | //dispose will be called automatically by closing its streams
5 | @override
6 | void dispose() {}
7 | }
8 |
--------------------------------------------------------------------------------
/android/gradle/wrapper/gradle-wrapper.properties:
--------------------------------------------------------------------------------
1 | #Fri Jun 23 08:50:38 CEST 2017
2 | distributionBase=GRADLE_USER_HOME
3 | distributionPath=wrapper/dists
4 | zipStoreBase=GRADLE_USER_HOME
5 | zipStorePath=wrapper/dists
6 | distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.2-all.zip
7 |
--------------------------------------------------------------------------------
/lib/app/shared/componenents/button_animation/button_animation_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 |
3 | class ButtonAnimationBloc extends Disposable {
4 | //dispose will be called automatically by closing its streams
5 | @override
6 | void dispose() {
7 | }
8 | }
9 |
--------------------------------------------------------------------------------
/.metadata:
--------------------------------------------------------------------------------
1 | # This file tracks properties of this Flutter project.
2 | # Used by Flutter tool to assess capabilities and perform upgrades etc.
3 | #
4 | # This file should be version controlled and should not be manually edited.
5 |
6 | version:
7 | revision: 27321ebbad34b0a3fafe99fac037102196d655ff
8 | channel: stable
9 |
10 | project_type: app
11 |
--------------------------------------------------------------------------------
/android/app/src/debug/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/android/app/src/profile/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/README.md:
--------------------------------------------------------------------------------
1 | # Launch Screen Assets
2 |
3 | You can customize the launch screen with your own desired assets by replacing the image files in this directory.
4 |
5 | You can also do it by opening your Flutter project's Xcode project with `open ios/Runner.xcworkspace`, selecting `Runner/Assets.xcassets` in the Project Navigator and dropping in the desired images.
--------------------------------------------------------------------------------
/android/app/src/main/res/values/styles.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
8 |
9 |
--------------------------------------------------------------------------------
/ios/Runner/AppDelegate.swift:
--------------------------------------------------------------------------------
1 | import UIKit
2 | import Flutter
3 |
4 | @UIApplicationMain
5 | @objc class AppDelegate: FlutterAppDelegate {
6 | override func application(
7 | _ application: UIApplication,
8 | didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?
9 | ) -> Bool {
10 | GeneratedPluginRegistrant.register(with: self)
11 | return super.application(application, didFinishLaunchingWithOptions: launchOptions)
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/android/app/src/main/res/drawable/launch_background.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
12 |
13 |
--------------------------------------------------------------------------------
/android/app/src/main/kotlin/com/example/desafio_github_search_09112019/MainActivity.kt:
--------------------------------------------------------------------------------
1 | package com.example.desafio_github
2 |
3 | import androidx.annotation.NonNull;
4 | import io.flutter.embedding.android.FlutterActivity
5 | import io.flutter.embedding.engine.FlutterEngine
6 | import io.flutter.plugins.GeneratedPluginRegistrant
7 |
8 | class MainActivity: FlutterActivity() {
9 | override fun configureFlutterEngine(@NonNull flutterEngine: FlutterEngine) {
10 | GeneratedPluginRegistrant.registerWith(flutterEngine);
11 | }
12 | }
13 |
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/LaunchImage.imageset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "universal",
5 | "filename" : "LaunchImage.png",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "universal",
10 | "filename" : "LaunchImage@2x.png",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "universal",
15 | "filename" : "LaunchImage@3x.png",
16 | "scale" : "3x"
17 | }
18 | ],
19 | "info" : {
20 | "version" : 1,
21 | "author" : "xcode"
22 | }
23 | }
24 |
--------------------------------------------------------------------------------
/android/settings.gradle:
--------------------------------------------------------------------------------
1 | include ':app'
2 |
3 | def flutterProjectRoot = rootProject.projectDir.parentFile.toPath()
4 |
5 | def plugins = new Properties()
6 | def pluginsFile = new File(flutterProjectRoot.toFile(), '.flutter-plugins')
7 | if (pluginsFile.exists()) {
8 | pluginsFile.withReader('UTF-8') { reader -> plugins.load(reader) }
9 | }
10 |
11 | plugins.each { name, path ->
12 | def pluginDirectory = flutterProjectRoot.resolve(path).resolve('android').toFile()
13 | include ":$name"
14 | project(":$name").projectDir = pluginDirectory
15 | }
16 |
--------------------------------------------------------------------------------
/lib/app/pages/github_page/github_page_module.dart:
--------------------------------------------------------------------------------
1 | import 'package:desafio_github/app/pages/github_page/github_page_bloc.dart';
2 | import 'package:desafio_github/app/pages/github_page/github_page_page.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | class GithubPageModule extends ChildModule {
6 | static Inject get to => Inject.of();
7 |
8 | @override
9 | List get binds => [
10 | Bind((i) => GithubPageBloc()),
11 | ];
12 |
13 | @override
14 | List get routers => [
15 | Router("/", child: (context, args) => GithubPagePage(args.data)),
16 | ];
17 | }
18 |
--------------------------------------------------------------------------------
/lib/app/pages/dados_perfil/repositories/dados_perfil_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 | import 'package:desafio_github/app/pages/dados_perfil/models/repos_model.dart';
3 | import 'package:dio/dio.dart';
4 |
5 | class DadosPerfilRepository extends Disposable {
6 | final Dio client;
7 |
8 | DadosPerfilRepository(this.client);
9 |
10 | Future getDadosPerfil(String url) async {
11 | final response = await client.get(url);
12 | return (response.data as List).map((data) => RepoModel.fromJson(data)).toList();
13 | }
14 |
15 | //dispose will be called automatically
16 | @override
17 | void dispose() {}
18 | }
19 |
--------------------------------------------------------------------------------
/ios/.gitignore:
--------------------------------------------------------------------------------
1 | *.mode1v3
2 | *.mode2v3
3 | *.moved-aside
4 | *.pbxuser
5 | *.perspectivev3
6 | **/*sync/
7 | .sconsign.dblite
8 | .tags*
9 | **/.vagrant/
10 | **/DerivedData/
11 | Icon?
12 | **/Pods/
13 | **/.symlinks/
14 | profile
15 | xcuserdata
16 | **/.generated/
17 | Flutter/App.framework
18 | Flutter/Flutter.framework
19 | Flutter/Flutter.podspec
20 | Flutter/Generated.xcconfig
21 | Flutter/app.flx
22 | Flutter/app.zip
23 | Flutter/flutter_assets/
24 | Flutter/flutter_export_environment.sh
25 | ServiceDefinitions.json
26 | Runner/GeneratedPluginRegistrant.*
27 |
28 | # Exceptions to above rules.
29 | !default.mode1v3
30 | !default.mode2v3
31 | !default.pbxuser
32 | !default.perspectivev3
33 |
--------------------------------------------------------------------------------
/android/build.gradle:
--------------------------------------------------------------------------------
1 | buildscript {
2 | ext.kotlin_version = '1.3.50'
3 | repositories {
4 | google()
5 | jcenter()
6 | }
7 |
8 | dependencies {
9 | classpath 'com.android.tools.build:gradle:3.5.0'
10 | classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
11 | }
12 | }
13 |
14 | allprojects {
15 | repositories {
16 | google()
17 | jcenter()
18 | }
19 | }
20 |
21 | rootProject.buildDir = '../build'
22 | subprojects {
23 | project.buildDir = "${rootProject.buildDir}/${project.name}"
24 | }
25 | subprojects {
26 | project.evaluationDependsOn(':app')
27 | }
28 |
29 | task clean(type: Delete) {
30 | delete rootProject.buildDir
31 | }
32 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Miscellaneous
2 | *.class
3 | *.log
4 | *.pyc
5 | *.swp
6 | .DS_Store
7 | .atom/
8 | .buildlog/
9 | .history
10 | .svn/
11 |
12 | # IntelliJ related
13 | *.iml
14 | *.ipr
15 | *.iws
16 | .idea/
17 |
18 | # The .vscode folder contains launch configuration and tasks you configure in
19 | # VS Code which you may wish to be included in version control, so this line
20 | # is commented out by default.
21 | #.vscode/
22 |
23 | # Flutter/Dart/Pub related
24 | **/doc/api/
25 | .dart_tool/
26 | .flutter-plugins
27 | .flutter-plugins-dependencies
28 | .packages
29 | .pub-cache/
30 | .pub/
31 | /build/
32 |
33 | # Web related
34 | lib/generated_plugin_registrant.dart
35 |
36 | # Exceptions to above rules.
37 | !/packages/flutter_tools/test/data/dart_dependencies_test/**/.packages
38 |
--------------------------------------------------------------------------------
/lib/app/pages/github_page/github_page_page.dart:
--------------------------------------------------------------------------------
1 | import 'dart:async';
2 |
3 | import 'package:flutter/material.dart';
4 | import 'package:webview_flutter/webview_flutter.dart';
5 |
6 | class GithubPagePage extends StatefulWidget {
7 | final String title;
8 | final String url;
9 |
10 | const GithubPagePage(this.url, {Key key, this.title = "GithubPage"})
11 | : super(key: key);
12 |
13 | @override
14 | _GithubPagePageState createState() => _GithubPagePageState();
15 | }
16 |
17 | class _GithubPagePageState extends State {
18 | @override
19 | Widget build(BuildContext context) {
20 | return Scaffold(
21 | appBar: AppBar(
22 | title: Text(widget.title),
23 | ),
24 | body: WebView(
25 | initialUrl: widget.url,
26 | javascriptMode: JavascriptMode.unrestricted,
27 | ),
28 | );
29 | }
30 | }
31 |
--------------------------------------------------------------------------------
/lib/app/pages/dados_perfil/dados_perfil_module.dart:
--------------------------------------------------------------------------------
1 | import 'package:desafio_github/app/pages/dados_perfil/repositories/dados_perfil_repository.dart';
2 | import 'package:dio/dio.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | import 'dados_perfil_bloc.dart';
6 | import 'dados_perfil_page.dart';
7 |
8 | class DadosPerfilModule extends ChildModule {
9 | @override
10 | List get binds => [
11 | Bind((i) => DadosPerfilBloc(i.params["model"], i.get())),
12 | Bind((i) => DadosPerfilRepository(i.get())),
13 | Bind((i) => Dio()),
14 | ];
15 |
16 | static Inject get to => Inject.of();
17 |
18 | @override
19 | List get routers => [
20 | Router(
21 | "/",
22 | child: (context, args) => DadosPerfilPage(model: args.data),
23 | transition: TransitionType.rotate,
24 | ),
25 | ];
26 | }
27 |
--------------------------------------------------------------------------------
/ios/Flutter/AppFrameworkInfo.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | App
9 | CFBundleIdentifier
10 | io.flutter.flutter.app
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | App
15 | CFBundlePackageType
16 | FMWK
17 | CFBundleShortVersionString
18 | 1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | 1.0
23 | MinimumOSVersion
24 | 8.0
25 |
26 |
27 |
--------------------------------------------------------------------------------
/lib/app/pages/usuarios/usuarios_module.dart:
--------------------------------------------------------------------------------
1 | import 'package:desafio_github/app/pages/usuarios/repositories/github_repository.dart';
2 | import 'package:desafio_github/app/pages/usuarios/usuarios_bloc.dart';
3 | import 'package:desafio_github/app/pages/usuarios/usuarios_page.dart';
4 | import 'package:desafio_github/app/pages/usuarios/widgets/card_github/card_github_bloc.dart';
5 | import 'package:dio/dio.dart';
6 | import 'package:flutter_modular/flutter_modular.dart';
7 |
8 | class UsuariosModule extends ChildModule {
9 | static Inject get to => Inject.of();
10 |
11 | @override
12 | List get binds => [
13 | Bind((i) => CardGithubBloc()),
14 | Bind((i) => UsuariosBloc(i.get())),
15 | Bind((i) => GithubRepository(i.get())),
16 | Bind((i) => Dio()),
17 | ];
18 |
19 | @override
20 | List get routers => [
21 | Router("/", child: (context, args) => UsuariosPage()),
22 | ];
23 | }
24 |
--------------------------------------------------------------------------------
/lib/app/pages/usuarios/repositories/github_repository.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 | import 'package:desafio_github/app/pages/usuarios/models/github_list_model.dart';
3 | import 'package:desafio_github/app/pages/usuarios/models/github_model.dart';
4 |
5 | import 'package:dio/dio.dart';
6 |
7 | class GithubRepository extends Disposable {
8 | final Dio client;
9 |
10 | GithubRepository(this.client);
11 |
12 | Future> getListOfGithub(String searchText) async {
13 | final response =
14 | await client.get('https://api.github.com/search/users?q=$searchText');
15 |
16 | return GithubListModel.fromJsonList(response.data["items"]);
17 | }
18 |
19 | Future getUserInfos(String user) async {
20 | final response = await client.get('https://api.github.com/users/$user');
21 | return GithubModel.fromJson(response.data);
22 | }
23 |
24 | @override
25 | void dispose() {}
26 | }
27 |
--------------------------------------------------------------------------------
/lib/app/app_module.dart:
--------------------------------------------------------------------------------
1 | import 'package:desafio_github/app/app_bloc.dart';
2 | import 'package:desafio_github/app/app_widget.dart';
3 | import 'package:desafio_github/app/pages/dados_perfil/dados_perfil_module.dart';
4 | import 'package:desafio_github/app/pages/github_page/github_page_module.dart';
5 | import 'package:desafio_github/app/pages/usuarios/usuarios_module.dart';
6 | import 'package:flutter/material.dart';
7 | import 'package:flutter_modular/flutter_modular.dart';
8 |
9 | class AppModule extends MainModule {
10 | static Inject get to => Inject.of();
11 |
12 | @override
13 | List get binds => [
14 | Bind((i) => AppBloc()),
15 | ];
16 |
17 | @override
18 | Widget get bootstrap => AppWidget();
19 |
20 | @override
21 | List get routers => [
22 | Router("/", module: UsuariosModule()),
23 | Router("/githubpage", module: GithubPageModule()),
24 | Router("/dadosperfil", module: DadosPerfilModule()),
25 | ];
26 | }
27 |
--------------------------------------------------------------------------------
/lib/app/app_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter/material.dart';
2 | import 'package:flutter/services.dart';
3 | import 'package:flutter_modular/flutter_modular.dart';
4 |
5 | class AppWidget extends StatelessWidget {
6 | @override
7 | Widget build(BuildContext context) {
8 | SystemChrome.setPreferredOrientations([
9 | DeviceOrientation.portraitUp,
10 | DeviceOrientation.portraitDown,
11 | ]);
12 |
13 | SystemChrome.setSystemUIOverlayStyle(
14 | const SystemUiOverlayStyle(
15 | statusBarColor: Colors.black45,
16 | systemNavigationBarColor: Color(0xff664EB8),
17 | systemNavigationBarDividerColor: Colors.black,
18 | systemNavigationBarIconBrightness: Brightness.light,
19 | ),
20 | );
21 |
22 | return MaterialApp(
23 | title: 'Flutter Slidy',
24 | theme: ThemeData(
25 | primaryColor: Color(0xff664EB8),
26 | // primaryTextTheme: TextTheme(
27 | // button: TextStyle(
28 | // color: Colors.white
29 | // )
30 | // )
31 | ),
32 | initialRoute: "/",
33 | onGenerateRoute: Modular.generateRoute,
34 | );
35 | }
36 | }
37 |
--------------------------------------------------------------------------------
/test/widget_test.dart:
--------------------------------------------------------------------------------
1 | // This is a basic Flutter widget test.
2 | //
3 | // To perform an interaction with a widget in your test, use the WidgetTester
4 | // utility that Flutter provides. For example, you can send tap and scroll
5 | // gestures. You can also use WidgetTester to find child widgets in the widget
6 | // tree, read text, and verify that the values of widget properties are correct.
7 |
8 | import 'package:flutter/material.dart';
9 | import 'package:flutter_test/flutter_test.dart';
10 |
11 | import 'package:desafio_github/main.dart';
12 |
13 | void main() {
14 | testWidgets('Counter increments smoke test', (WidgetTester tester) async {
15 | // Build our app and trigger a frame.
16 | await tester.pumpWidget(MyApp());
17 |
18 | // Verify that our counter starts at 0.
19 | expect(find.text('0'), findsOneWidget);
20 | expect(find.text('1'), findsNothing);
21 |
22 | // Tap the '+' icon and trigger a frame.
23 | await tester.tap(find.byIcon(Icons.add));
24 | await tester.pump();
25 |
26 | // Verify that our counter has incremented.
27 | expect(find.text('0'), findsNothing);
28 | expect(find.text('1'), findsOneWidget);
29 | });
30 | }
31 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Desafio Github Search
2 |
3 | Projeto desenvolvido no desafio quizenal realizado pela equipe Flutterando e comunidade.
4 | Foram realizadas adaptações para implementação do padrão de projeto open-source [Flutter Modular](https://pub.dev/packages/flutter_modular).
5 |
6 |
7 |
8 |
9 | ## Getting Started
10 | This project is a starting point for a Flutter application.
11 |
12 | A few resources to get you started if this is your first Flutter project:
13 |
14 | - [Lab: Write your first Flutter app](https://flutter.dev/docs/get-started/codelab)
15 | - [Cookbook: Useful Flutter samples](https://flutter.dev/docs/cookbook)
16 |
17 | For help getting started with Flutter, view our
18 | [online documentation](https://flutter.dev/docs), which offers tutorials,
19 | samples, guidance on mobile development, and a full API reference.
20 |
--------------------------------------------------------------------------------
/lib/app/pages/dados_perfil/dados_perfil_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'package:flutter_modular/flutter_modular.dart';
2 | import 'package:desafio_github/app/pages/dados_perfil/models/repos_model.dart';
3 | import 'package:desafio_github/app/pages/dados_perfil/repositories/dados_perfil_repository.dart';
4 | import 'package:desafio_github/app/pages/usuarios/models/github_model.dart';
5 | import 'package:rxdart/rxdart.dart';
6 |
7 | class DadosPerfilBloc extends Disposable {
8 | final GithubModel githubModel;
9 | final DadosPerfilRepository dadosPerfilRepository;
10 | DadosPerfilBloc(this.githubModel, this.dadosPerfilRepository) {
11 | githubModel$.add(githubModel);
12 | dadosPerfilRepository
13 | .getDadosPerfil(githubModel.reposUrl)
14 | .then((dadosPerfil) {
15 | repoModel$.add(dadosPerfil);
16 | });
17 | }
18 |
19 | BehaviorSubject githubModel$ = BehaviorSubject();
20 |
21 | BehaviorSubject> repoModel$ = BehaviorSubject>();
22 |
23 | //dispose will be called automatically by closing its streams
24 | @override
25 | void dispose() {
26 | githubModel$.close();
27 | repoModel$.close();
28 | }
29 | }
30 |
--------------------------------------------------------------------------------
/lib/app/pages/usuarios/usuarios_bloc.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | import 'package:desafio_github/app/pages/usuarios/repositories/github_repository.dart';
4 | import 'package:flutter/cupertino.dart';
5 | import 'package:flutter_modular/flutter_modular.dart';
6 | import 'package:hydrated/hydrated.dart';
7 |
8 | import 'models/github_list_model.dart';
9 | import 'models/github_model.dart';
10 |
11 | class UsuariosBloc extends Disposable {
12 | final GithubRepository githubRepository;
13 |
14 | var textController = TextEditingController();
15 |
16 | UsuariosBloc(this.githubRepository);
17 |
18 | var usuarios$ = HydratedSubject>("usuarios",
19 | seedValue: [],
20 | hydrate: (String s) => s == null ? [] : (json.decode(s) as List).map((item) => GithubModel.fromJson(item)).toList(),
21 | persist: (users) => json.encode(users.map((user) => user.toJson()).toList()));
22 |
23 | Future> searchGithub(String searchText) async {
24 | return await githubRepository.getListOfGithub(searchText);
25 | }
26 |
27 | Future addUser(GithubListModel user) async {
28 | var items = usuarios$.value;
29 |
30 | var usuario = await githubRepository.getUserInfos(user.login);
31 |
32 | items.add(usuario);
33 | usuarios$.add(items);
34 | }
35 |
36 | @override
37 | void dispose() {
38 | usuarios$.close();
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/android/app/src/main/AndroidManifest.xml:
--------------------------------------------------------------------------------
1 |
3 |
8 |
12 |
19 |
20 |
21 |
22 |
23 |
24 |
26 |
29 |
30 |
31 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/Main.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/ios/Runner/Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | $(DEVELOPMENT_LANGUAGE)
7 | CFBundleExecutable
8 | $(EXECUTABLE_NAME)
9 | CFBundleIdentifier
10 | $(PRODUCT_BUNDLE_IDENTIFIER)
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundleName
14 | desafio_github
15 | CFBundlePackageType
16 | APPL
17 | CFBundleShortVersionString
18 | $(FLUTTER_BUILD_NAME)
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | $(FLUTTER_BUILD_NUMBER)
23 | LSRequiresIPhoneOS
24 |
25 | UILaunchStoryboardName
26 | LaunchScreen
27 | UIMainStoryboardFile
28 | Main
29 | UISupportedInterfaceOrientations
30 |
31 | UIInterfaceOrientationPortrait
32 | UIInterfaceOrientationLandscapeLeft
33 | UIInterfaceOrientationLandscapeRight
34 |
35 | UISupportedInterfaceOrientations~ipad
36 |
37 | UIInterfaceOrientationPortrait
38 | UIInterfaceOrientationPortraitUpsideDown
39 | UIInterfaceOrientationLandscapeLeft
40 | UIInterfaceOrientationLandscapeRight
41 |
42 | UIViewControllerBasedStatusBarAppearance
43 |
44 |
45 |
46 |
--------------------------------------------------------------------------------
/android/app/build.gradle:
--------------------------------------------------------------------------------
1 | def localProperties = new Properties()
2 | def localPropertiesFile = rootProject.file('local.properties')
3 | if (localPropertiesFile.exists()) {
4 | localPropertiesFile.withReader('UTF-8') { reader ->
5 | localProperties.load(reader)
6 | }
7 | }
8 |
9 | def flutterRoot = localProperties.getProperty('flutter.sdk')
10 | if (flutterRoot == null) {
11 | throw new GradleException("Flutter SDK not found. Define location with flutter.sdk in the local.properties file.")
12 | }
13 |
14 | def flutterVersionCode = localProperties.getProperty('flutter.versionCode')
15 | if (flutterVersionCode == null) {
16 | flutterVersionCode = '1'
17 | }
18 |
19 | def flutterVersionName = localProperties.getProperty('flutter.versionName')
20 | if (flutterVersionName == null) {
21 | flutterVersionName = '1.0'
22 | }
23 |
24 | apply plugin: 'com.android.application'
25 | apply plugin: 'kotlin-android'
26 | apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
27 |
28 | android {
29 | compileSdkVersion 28
30 |
31 | sourceSets {
32 | main.java.srcDirs += 'src/main/kotlin'
33 | }
34 |
35 | lintOptions {
36 | disable 'InvalidPackage'
37 | }
38 |
39 | defaultConfig {
40 | // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
41 | applicationId "com.example.desafio_github"
42 | minSdkVersion 16
43 | targetSdkVersion 28
44 | versionCode flutterVersionCode.toInteger()
45 | versionName flutterVersionName
46 | testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
47 | }
48 |
49 | buildTypes {
50 | release {
51 | // TODO: Add your own signing config for the release build.
52 | // Signing with the debug keys for now, so `flutter run --release` works.
53 | signingConfig signingConfigs.debug
54 | }
55 | }
56 | }
57 |
58 | flutter {
59 | source '../..'
60 | }
61 |
62 | dependencies {
63 | implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
64 | testImplementation 'junit:junit:4.12'
65 | androidTestImplementation 'androidx.test:runner:1.1.1'
66 | androidTestImplementation 'androidx.test.espresso:espresso-core:3.1.1'
67 | }
68 |
--------------------------------------------------------------------------------
/lib/app/pages/usuarios/widgets/card_github/card_github_widget.dart:
--------------------------------------------------------------------------------
1 | import 'package:desafio_github/app/pages/dados_perfil/dados_perfil_module.dart';
2 | import 'package:desafio_github/app/pages/usuarios/models/github_model.dart';
3 | import 'package:flutter/material.dart';
4 |
5 | class CardGithubWidget extends StatelessWidget {
6 | final GithubModel githubModel;
7 | final Function hideButtom;
8 | final Function showButtom;
9 |
10 | const CardGithubWidget(
11 | {Key key, this.githubModel, this.hideButtom, this.showButtom})
12 | : super(key: key);
13 | @override
14 | Widget build(BuildContext context) {
15 | return Padding(
16 | padding: const EdgeInsets.symmetric(horizontal: 40, vertical: 20),
17 | child: Column(
18 | children: [
19 | CircleAvatar(
20 | radius: 40,
21 | backgroundImage: NetworkImage(githubModel.avatarUrl),
22 | ),
23 | SizedBox(
24 | height: 10,
25 | ),
26 | Text(
27 | githubModel?.name,
28 | style: TextStyle(fontSize: 14, fontWeight: FontWeight.bold),
29 | ),
30 | SizedBox(
31 | height: 10,
32 | ),
33 | Text(
34 | githubModel?.bio ?? "Nao informado",
35 | style: TextStyle(color: Colors.black54),
36 | textAlign: TextAlign.center,
37 | ),
38 | SizedBox(
39 | height: 10,
40 | ),
41 | Text(
42 | githubModel?.blog ?? "Nao informado",
43 | style: TextStyle(color: Colors.black54),
44 | ),
45 | Container(
46 | width: MediaQuery.of(context).size.width * .7,
47 | child: RaisedButton(
48 | onPressed: () async {
49 | hideButtom();
50 | await Navigator.pushNamed(
51 | context,
52 | "/dadosperfil",
53 | arguments: githubModel,
54 | );
55 | showButtom();
56 | },
57 | child: Text(
58 | "Ver Perfil",
59 | style: TextStyle(
60 | color: Theme.of(context).primaryTextTheme.button.color),
61 | ),
62 | color: Theme.of(context).primaryColor,
63 | ))
64 | ],
65 | ),
66 | );
67 | }
68 | }
69 |
--------------------------------------------------------------------------------
/ios/Runner/Base.lproj/LaunchScreen.storyboard:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 |
30 |
31 |
32 |
33 |
34 |
35 |
36 |
37 |
38 |
--------------------------------------------------------------------------------
/lib/app/pages/dados_perfil/models/owner_model.dart:
--------------------------------------------------------------------------------
1 |
2 | class OwnerModel {
3 | String login;
4 | int id;
5 | String nodeId;
6 | String avatarUrl;
7 | String gravatarId;
8 | String url;
9 | String htmlUrl;
10 | String followersUrl;
11 | String followingUrl;
12 | String gistsUrl;
13 | String starredUrl;
14 | String subscriptionsUrl;
15 | String organizationsUrl;
16 | String reposUrl;
17 | String eventsUrl;
18 | String receivedEventsUrl;
19 | String type;
20 | bool siteAdmin;
21 |
22 | OwnerModel({
23 | this.login,
24 | this.id,
25 | this.nodeId,
26 | this.avatarUrl,
27 | this.gravatarId,
28 | this.url,
29 | this.htmlUrl,
30 | this.followersUrl,
31 | this.followingUrl,
32 | this.gistsUrl,
33 | this.starredUrl,
34 | this.subscriptionsUrl,
35 | this.organizationsUrl,
36 | this.reposUrl,
37 | this.eventsUrl,
38 | this.receivedEventsUrl,
39 | this.type,
40 | this.siteAdmin,
41 | });
42 |
43 | static OwnerModel fromJson(Map json) => OwnerModel(
44 | login: json["login"],
45 | id: json["id"],
46 | nodeId: json["node_id"],
47 | avatarUrl: json["avatar_url"],
48 | gravatarId: json["gravatar_id"],
49 | url: json["url"],
50 | htmlUrl: json["html_url"],
51 | followersUrl: json["followers_url"],
52 | followingUrl: json["following_url"],
53 | gistsUrl: json["gists_url"],
54 | starredUrl: json["starred_url"],
55 | subscriptionsUrl: json["subscriptions_url"],
56 | organizationsUrl: json["organizations_url"],
57 | reposUrl: json["repos_url"],
58 | eventsUrl: json["events_url"],
59 | receivedEventsUrl: json["received_events_url"],
60 | type: json["type"],
61 | siteAdmin: json["site_admin"],
62 | );
63 |
64 | Map toJson() => {
65 | "login": login,
66 | "id": id,
67 | "node_id": nodeId,
68 | "avatar_url": avatarUrl,
69 | "gravatar_id": gravatarId,
70 | "url": url,
71 | "html_url": htmlUrl,
72 | "followers_url": followersUrl,
73 | "following_url": followingUrl,
74 | "gists_url": gistsUrl,
75 | "starred_url": starredUrl,
76 | "subscriptions_url": subscriptionsUrl,
77 | "organizations_url": organizationsUrl,
78 | "repos_url": reposUrl,
79 | "events_url": eventsUrl,
80 | "received_events_url": receivedEventsUrl,
81 | "type": type,
82 | "site_admin": siteAdmin,
83 | };
84 | }
85 |
--------------------------------------------------------------------------------
/pubspec.yaml:
--------------------------------------------------------------------------------
1 | name: desafio_github
2 | description: A new Flutter project.
3 |
4 | # The following defines the version and build number for your application.
5 | # A version number is three numbers separated by dots, like 1.2.43
6 | # followed by an optional build number separated by a +.
7 | # Both the version and the builder number may be overridden in flutter
8 | # build by specifying --build-name and --build-number, respectively.
9 | # In Android, build-name is used as versionName while build-number used as versionCode.
10 | # Read more about Android versioning at https://developer.android.com/studio/publish/versioning
11 | # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion.
12 | # Read more about iOS versioning at
13 | # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html
14 | version: 1.0.0+1
15 |
16 | environment:
17 | sdk: ">=2.1.0 <3.0.0"
18 |
19 | dependencies:
20 | flutter_modular: ^0.0.12
21 | webview_flutter: ^0.3.15+1
22 | hydrated: ^1.2.4
23 | select_dialog: ^1.0.6+1
24 | dio: ^3.0.4
25 | rxdart: ^0.22.6
26 | flutter:
27 | sdk: flutter
28 |
29 | # The following adds the Cupertino Icons font to your application.
30 | # Use with the CupertinoIcons class for iOS style icons.
31 | cupertino_icons: ^0.1.2
32 |
33 | dev_dependencies:
34 | mockito: ^4.1.1
35 | flutter_test:
36 | sdk: flutter
37 |
38 |
39 | # For information on the generic Dart part of this file, see the
40 | # following page: https://dart.dev/tools/pub/pubspec
41 |
42 | # The following section is specific to Flutter.
43 | flutter:
44 |
45 | # The following line ensures that the Material Icons font is
46 | # included with your application, so that you can use the icons in
47 | # the material Icons class.
48 | uses-material-design: true
49 |
50 | # To add assets to your application, add an assets section, like this:
51 | # assets:
52 | # - images/a_dot_burr.jpeg
53 | # - images/a_dot_ham.jpeg
54 |
55 | # An image asset can refer to one or more resolution-specific "variants", see
56 | # https://flutter.dev/assets-and-images/#resolution-aware.
57 |
58 | # For details regarding adding assets from package dependencies, see
59 | # https://flutter.dev/assets-and-images/#from-packages
60 |
61 | # To add custom fonts to your application, add a fonts section here,
62 | # in this "flutter" section. Each entry in this list should have a
63 | # "family" key with the font family name, and a "fonts" key with a
64 | # list giving the asset and other descriptors for the font. For
65 | # example:
66 | # fonts:
67 | # - family: Schyler
68 | # fonts:
69 | # - asset: fonts/Schyler-Regular.ttf
70 | # - asset: fonts/Schyler-Italic.ttf
71 | # style: italic
72 | # - family: Trajan Pro
73 | # fonts:
74 | # - asset: fonts/TrajanPro.ttf
75 | # - asset: fonts/TrajanPro_Bold.ttf
76 | # weight: 700
77 | #
78 | # For details regarding fonts from package dependencies,
79 | # see https://flutter.dev/custom-fonts/#from-packages
--------------------------------------------------------------------------------
/ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "size" : "20x20",
5 | "idiom" : "iphone",
6 | "filename" : "Icon-App-20x20@2x.png",
7 | "scale" : "2x"
8 | },
9 | {
10 | "size" : "20x20",
11 | "idiom" : "iphone",
12 | "filename" : "Icon-App-20x20@3x.png",
13 | "scale" : "3x"
14 | },
15 | {
16 | "size" : "29x29",
17 | "idiom" : "iphone",
18 | "filename" : "Icon-App-29x29@1x.png",
19 | "scale" : "1x"
20 | },
21 | {
22 | "size" : "29x29",
23 | "idiom" : "iphone",
24 | "filename" : "Icon-App-29x29@2x.png",
25 | "scale" : "2x"
26 | },
27 | {
28 | "size" : "29x29",
29 | "idiom" : "iphone",
30 | "filename" : "Icon-App-29x29@3x.png",
31 | "scale" : "3x"
32 | },
33 | {
34 | "size" : "40x40",
35 | "idiom" : "iphone",
36 | "filename" : "Icon-App-40x40@2x.png",
37 | "scale" : "2x"
38 | },
39 | {
40 | "size" : "40x40",
41 | "idiom" : "iphone",
42 | "filename" : "Icon-App-40x40@3x.png",
43 | "scale" : "3x"
44 | },
45 | {
46 | "size" : "60x60",
47 | "idiom" : "iphone",
48 | "filename" : "Icon-App-60x60@2x.png",
49 | "scale" : "2x"
50 | },
51 | {
52 | "size" : "60x60",
53 | "idiom" : "iphone",
54 | "filename" : "Icon-App-60x60@3x.png",
55 | "scale" : "3x"
56 | },
57 | {
58 | "size" : "20x20",
59 | "idiom" : "ipad",
60 | "filename" : "Icon-App-20x20@1x.png",
61 | "scale" : "1x"
62 | },
63 | {
64 | "size" : "20x20",
65 | "idiom" : "ipad",
66 | "filename" : "Icon-App-20x20@2x.png",
67 | "scale" : "2x"
68 | },
69 | {
70 | "size" : "29x29",
71 | "idiom" : "ipad",
72 | "filename" : "Icon-App-29x29@1x.png",
73 | "scale" : "1x"
74 | },
75 | {
76 | "size" : "29x29",
77 | "idiom" : "ipad",
78 | "filename" : "Icon-App-29x29@2x.png",
79 | "scale" : "2x"
80 | },
81 | {
82 | "size" : "40x40",
83 | "idiom" : "ipad",
84 | "filename" : "Icon-App-40x40@1x.png",
85 | "scale" : "1x"
86 | },
87 | {
88 | "size" : "40x40",
89 | "idiom" : "ipad",
90 | "filename" : "Icon-App-40x40@2x.png",
91 | "scale" : "2x"
92 | },
93 | {
94 | "size" : "76x76",
95 | "idiom" : "ipad",
96 | "filename" : "Icon-App-76x76@1x.png",
97 | "scale" : "1x"
98 | },
99 | {
100 | "size" : "76x76",
101 | "idiom" : "ipad",
102 | "filename" : "Icon-App-76x76@2x.png",
103 | "scale" : "2x"
104 | },
105 | {
106 | "size" : "83.5x83.5",
107 | "idiom" : "ipad",
108 | "filename" : "Icon-App-83.5x83.5@2x.png",
109 | "scale" : "2x"
110 | },
111 | {
112 | "size" : "1024x1024",
113 | "idiom" : "ios-marketing",
114 | "filename" : "Icon-App-1024x1024@1x.png",
115 | "scale" : "1x"
116 | }
117 | ],
118 | "info" : {
119 | "version" : 1,
120 | "author" : "xcode"
121 | }
122 | }
123 |
--------------------------------------------------------------------------------
/lib/app/pages/usuarios/models/github_list_model.dart:
--------------------------------------------------------------------------------
1 | import 'dart:convert';
2 |
3 | GithubListModel githubListModelFromJson(String str) =>
4 | GithubListModel.fromJson(json.decode(str));
5 |
6 | String githubModelListToJson(GithubListModel data) => json.encode(data.toJson());
7 |
8 | class GithubListModel {
9 | String login;
10 | int id;
11 | String nodeId;
12 | String avatarUrl;
13 | String gravatarId;
14 | String url;
15 | String htmlUrl;
16 | String followersUrl;
17 | String followingUrl;
18 | String gistsUrl;
19 | String starredUrl;
20 | String subscriptionsUrl;
21 | String organizationsUrl;
22 | String reposUrl;
23 | String eventsUrl;
24 | String receivedEventsUrl;
25 | String type;
26 | bool siteAdmin;
27 | double score;
28 |
29 | GithubListModel({
30 | this.login,
31 | this.id,
32 | this.nodeId,
33 | this.avatarUrl,
34 | this.gravatarId,
35 | this.url,
36 | this.htmlUrl,
37 | this.followersUrl,
38 | this.followingUrl,
39 | this.gistsUrl,
40 | this.starredUrl,
41 | this.subscriptionsUrl,
42 | this.organizationsUrl,
43 | this.reposUrl,
44 | this.eventsUrl,
45 | this.receivedEventsUrl,
46 | this.type,
47 | this.siteAdmin,
48 | this.score,
49 | });
50 |
51 | static GithubListModel fromJson(Map json) {
52 | if (json == null) return null;
53 |
54 | return GithubListModel(
55 | login: json["login"],
56 | id: json["id"],
57 | nodeId: json["node_id"],
58 | avatarUrl: json["avatar_url"],
59 | gravatarId: json["gravatar_id"],
60 | url: json["url"],
61 | htmlUrl: json["html_url"],
62 | followersUrl: json["followers_url"],
63 | followingUrl: json["following_url"],
64 | gistsUrl: json["gists_url"],
65 | starredUrl: json["starred_url"],
66 | subscriptionsUrl: json["subscriptions_url"],
67 | organizationsUrl: json["organizations_url"],
68 | reposUrl: json["repos_url"],
69 | eventsUrl: json["events_url"],
70 | receivedEventsUrl: json["received_events_url"],
71 | type: json["type"],
72 | siteAdmin: json["site_admin"],
73 | score: json["score"].toDouble(),
74 | );
75 | }
76 |
77 | Map toJson() => {
78 | "login": login,
79 | "id": id,
80 | "node_id": nodeId,
81 | "avatar_url": avatarUrl,
82 | "gravatar_id": gravatarId,
83 | "url": url,
84 | "html_url": htmlUrl,
85 | "followers_url": followersUrl,
86 | "following_url": followingUrl,
87 | "gists_url": gistsUrl,
88 | "starred_url": starredUrl,
89 | "subscriptions_url": subscriptionsUrl,
90 | "organizations_url": organizationsUrl,
91 | "repos_url": reposUrl,
92 | "events_url": eventsUrl,
93 | "received_events_url": receivedEventsUrl,
94 | "type": type,
95 | "site_admin": siteAdmin,
96 | "score": score,
97 | };
98 |
99 | static List fromJsonList(List json) {
100 | if (json == null) return null;
101 | return json.cast