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
[ | |
{ | |
"Id": "001", | |
"Name": "Opportunity 1", | |
"CloseDate": "2023-04-30", | |
"StageName": "Prospecting", | |
"Amount": 10000.00 | |
}, | |
{ | |
"Id": "002", |
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:flutter/widgets.dart'; | |
import 'package:vector_math/vector_math_64.dart' show radians; | |
void main() => runApp(ExampleApp()); | |
class ExampleItem { | |
static const Pineapples = ExampleItem._('Pineapples'); | |
static const Watermelons = ExampleItem._('Watermelons'); | |
static const StarFruit = ExampleItem._('Star Fruit'); |
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:async'; | |
import 'package:flutter/material.dart'; | |
// See: https://twitter.com/shakil807/status/1042127387515858949 | |
void main() => runApp(ChipsDemoApp()); | |
class ChipsDemoApp extends StatelessWidget { | |
@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
// Copyright 2017, the Flutter project authors. Please see the AUTHORS file | |
// for details. All rights reserved. Use of this source code is governed by a | |
// BSD-style license that can be found in the LICENSE file. | |
import 'dart:async'; | |
import 'dart:collection'; | |
import 'package:cloud_firestore/cloud_firestore.dart'; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; |
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:firebase_storage/firebase_storage.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:meta/meta.dart'; | |
enum ImageDownloadState { Idle, GettingURL, Downloading, Done, Error } | |
class FirebaseStorageImage extends StatefulWidget { | |
/// The reference of the image that has to be loaded. | |
final StorageReference reference; | |
/// The widget that will be displayed when loading if no [placeholderImage] is set. |
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
alias ls='ls -laG' | |
alias ll='ls -l' | |
# adb commands targeted at specific devices without having to remember the device string | |
alias adbm='adb -s TA989069LK' | |
alias adbn='adb -s HT4CTJT01433' | |
alias adbs='adb -s 1a138b5e' | |
# copy prefs from an xml file to the device, save some of the settings setup work | |
function cpPrefs { |
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
//Check for Android Network Connectivity | |
private boolean isOnline() { | |
ConnectivityManager connectivityManager = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); | |
NetworkInfo activeNetwork = connectivityManager.getActiveNetworkInfo(); | |
boolean isConnected = activeNetwork != null && activeNetwork.isConnectedOrConnecting(); | |
if (isConnected) { | |
//do something | |
} else { | |
// Toast.makeText(mContext, "This app requires an internet connection", Toast.LENGTH_SHORT).show(); | |
Toast.makeText(this, getString(R.string.network_toast), Toast.LENGTH_SHORT).show(); |