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
let dartDefinesString = Bundle.main.infoDictionary!["DART_DEFINES"] as! String | |
var dartDefinesDictionary = [String:String]() | |
for definedValue in dartDefinesString.components(separatedBy: ",") { | |
let decoded = String(data: Data(base64Encoded: definedValue)!, encoding: .utf8)! | |
let values = decoded.components(separatedBy: "=") | |
dartDefinesDictionary[values[0]] = values[1] | |
} |
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 (c) 2023, the Dart 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 'package:flutter/material.dart'; | |
void main() => runApp(MyApp()); |
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:collection/collection.dart'; | |
Function listEquals = const ListEquality().equals; | |
class DateUtils { | |
static String formatDuration(DateTime dateTime, | |
{String years = "year(s)", | |
String months = "month(s)", | |
String days = "day(s)", |
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:math'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
Widget buildAppleRefreshIndicator( | |
BuildContext context, | |
RefreshIndicatorMode refreshState, | |
double pulledExtent, | |
double refreshTriggerPullDistance, |
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/gestures.dart'; | |
import 'package:flutter/material.dart'; | |
/// Signature for when a pointer has remained in contact with the screen at the | |
/// same location for a long period of time. | |
typedef void GestureHoldCallback(); | |
/// Signature for when the pointer that previously triggered a |
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'; | |
/// Below is the usage for this function, you'll only have to import this file | |
/// [radius] takes a double and will be the radius to the rounded corners of this modal | |
/// [color] will color the modal itself, the default being `Colors.white` | |
/// [builder] takes the content of the modal, if you're using [Column] | |
/// or a similar widget, remember to set `mainAxisSize: MainAxisSize.min` | |
/// so it will only take the needed space. |