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
// | |
// CustomCollectionFlowLayout.h | |
// evilapples | |
// | |
// http://stackoverflow.com/questions/13511733/how-to-make-supplementary-view-float-in-uicollectionview-as-section-headers-do-i | |
// | |
// | |
#import <UIKit/UIKit.h> |
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
// | |
// UIImage+Decompress.swift | |
// | |
// Created by Hashem Aboonajmi on 15/02/2017 | |
// | |
import UIKit | |
extension UIImage { | |
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
/// Is Naurt's Locomotion running at the moment? | |
Future<bool> isRunning() { | |
throw UnimplementedError('isRunning() has not been implemented.'); | |
} | |
ValueChanged<bool>? onRunning; | |
/// Streams location changes | |
Stream<NaurtLocation> get onLocationChanged { | |
throw UnimplementedError('onLocationChanged has not been implemented.'); | |
} |
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/foundation.dart'; | |
import 'package:flutter/services.dart'; | |
import 'package:naurt_platfrom_interface/naurt_platform_interface.dart'; | |
/// An implementation of [NaurtIOS] that uses method channels. | |
class NaurtIOS extends NaurtPlatform { | |
/// The method channel used to interact with the native platform. | |
@visibleForTesting | |
final methodChannel = const MethodChannel('com.naurt.ios'); |
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 Flutter | |
import Combine | |
import UIKit | |
import naurt_framework | |
public class SwiftNaurtIosPlugin: NSObject, FlutterPlugin { | |
private var subscriptions = [AnyCancellable]() | |
public static func register(with registrar: FlutterPluginRegistrar) { | |
let channel = FlutterMethodChannel(name: "com.naurt.ios", binaryMessenger: registrar.messenger()) |
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
// You’re making a shopping app called RubberBaby, which sells dolls. Unfortunately, you’ve run into | |
// a problem on the order page. If a customer makes one order for blue dolls and another order for | |
// red dolls but then tries to delete the blue doll order, the red doll order is wrong. | |
// Given only the following code, how would you fix the RubberBaby buggy buttons? | |
import 'package:flutter/material.dart'; | |
const Color darkBlue = Color.fromARGB(255, 18, 32, 47); |
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'; | |
// This size work fine on my design, maybe you need some customization depends on your design | |
const _desktopMinSize = 1100; | |
const _tabletMinSize = 740; | |
class Responsive { | |
// This isMobile, isTablet, isDesktop helep us later |
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
Row( | |
crossAxisAlignment: CrossAxisAlignment.start, | |
mainAxisAlignment: MainAxisAlignment.center, | |
children: [ | |
...() { | |
return Responsive.isMobile(context) == false | |
? [ | |
SideMenu( | |
onPressed: ((index) { | |
_selectedIndex = index; |
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'; | |
const _desktopMinSize = 1100; | |
const _tabletMinSize = 740; | |
class Responsive extends StatelessWidget { | |
final Widget mobile; | |
final Widget? tablet; | |
final Widget desktop; |
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
Center( | |
child: Responsive( | |
mobile: _BelowDesktopLayout(), | |
tablet: _BelowDesktopLayout(), | |
desktop: _DesktopLayout(), | |
), | |
) |
OlderNewer