This file contains hidden or 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
| class Home extends StatefulWidget { | |
| Home({Key key}) : super(key: key); | |
| @override | |
| State<StatefulWidget> createState() => _HomeState(); | |
| } | |
| class _HomeState extends State<Home> { | |
| List<Repo> _repos = List(); | |
| bool _isFetching = false; |
This file contains hidden or 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
| class GithubItem extends StatelessWidget { | |
| final Repo repo; | |
| GithubItem(this.repo); | |
| @override | |
| Widget build(BuildContext context) { | |
| return Card( | |
| child: InkWell( | |
| highlightColor: Colors.lightBlueAccent, | |
| splashColor: Colors.red, |
This file contains hidden or 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:github_search/repo.dart'; | |
| import 'package:date_format/date_format.dart'; | |
| import 'dart:convert' show json, utf8; | |
| import 'dart:io'; | |
| import 'dart:async'; | |
| class Api { | |
| static final HttpClient _httpClient = HttpClient(); | |
| static final String _url = "api.github.com"; |
This file contains hidden or 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
| class Repo { | |
| final String htmlUrl; | |
| final int watchersCount; | |
| final String language; | |
| final String description; | |
| final String name; | |
| final String owner; | |
| Repo(this.htmlUrl, this.watchersCount, this.language, this.description, | |
| this.name, this.owner); |
This file contains hidden or 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/material.dart'; | |
| import 'package:github_search/api.dart'; | |
| import 'package:github_search/repo.dart'; | |
| import 'package:github_search/item.dart'; | |
| import 'dart:async'; | |
| class SearchList extends StatefulWidget { | |
| SearchList({Key key}) : super(key: key); | |
| @override |
This file contains hidden or 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:github_search/repo.dart'; | |
| import 'package:date_format/date_format.dart'; | |
| import 'dart:convert' show json, utf8; | |
| import 'dart:io'; | |
| import 'dart:async'; | |
| class Api { | |
| static final HttpClient _httpClient = HttpClient(); | |
| static final String _url = "api.github.com"; |
This file contains hidden or 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 Foundation | |
| class EmailModel { | |
| static let valueDidChange = Notification.Name("valueDidChange") | |
| static let isValidDidChange = Notification.Name("isValidDidChange") | |
| static private let regexEmail = "[A-Z0-9a-z\\._%+-]+@([A-Za-z0-9-]+\\.)+[A-Za-z]{2,4}" | |
| init(value: String) { | |
| self.value = value |
This file contains hidden or 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 Foundation | |
| class EmailViewModel: NSObject { | |
| private let emailModel: EmailModel | |
| @objc dynamic var emailTextValue: String | |
| @objc dynamic var isValidValue: Bool | |
| private var emailTextObserver: NSObjectProtocol? | |
| private var isValidObserver: NSObjectProtocol? |
This file contains hidden or 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 | |
| class ViewController: UITableViewController { | |
| @IBOutlet weak var emailTextField: UITextField! | |
| @IBOutlet weak var emailValidationLabel: UILabel! | |
| let emailViewModel = EmailViewModel(emailModel: EmailModel(value: "")) | |
| var emailTextObserver: NSObjectProtocol? | |
| var isValidEmailObserver: NSObjectProtocol? | |
This file contains hidden or 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 express, { Router, Request } from 'express'; | |
| import admin from 'firebase-admin'; | |
| admin.initializeApp({ | |
| credential: admin.credential.applicationDefault() | |
| }); | |
| const db = admin.firestore(); | |
| const router = Router() | |
| router.get('/', async (req, res, next) => { |
OlderNewer