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 | |
import UIKit | |
private let InstagramAppURL = URL(string: "instagram://app")! | |
class InstagramActivity: UIActivity, UIDocumentInteractionControllerDelegate { | |
override class var activityCategory: UIActivityCategory { return .share } | |
override var activityType: UIActivityType? { return UIActivityType("postToInstagram") } | |
override var activityTitle: String? { return "Instagram" } | |
override var activityImage: UIImage? { return #imageLiteral(resourceName: "instagram_activity") } |
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'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'NonStopIO', | |
theme: new ThemeData( |
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:http/http.dart' as http; | |
import 'package:http/http.dart'; | |
class Resource<T> { | |
final String url; | |
T Function(Response response) parse; | |
Resource({this.url,this.parse}); | |
} |
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 Product { | |
final int id; | |
final String name; | |
final List<Image> images; | |
Product({this.id, this.name, this.images}); | |
factory Product.fromJson(Map<String, dynamic> parsedJson){ | |
var list = parsedJson['images'] as List; |
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 InstaStories: NSObject { | |
private let urlScheme = URL(string: "instagram-stories://share")! | |
enum optionsKey: String { | |
case StickerImage = "com.instagram.sharedSticker.stickerImage" | |
case bgImage = "com.instagram.sharedSticker.backgroundImage" | |
case bgVideo = "com.instagram.sharedSticker.backgroundVideo" |
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
// APIService.swift | |
// MovieSwift | |
// | |
// Created by Thomas Ricouard on 06/06/2019. | |
// Copyright © 2019 Thomas Ricouard. All rights reserved. | |
// | |
import Foundation | |
struct APIService { | |
let baseURL = URL(string: "https://api.themoviedb.org/3")! |
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 'dart:convert'; | |
import 'dart:math'; | |
import 'dart:ui'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
void main() => runApp(ApiCall()); | |
class ApiCall extends StatelessWidget { |