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/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
/// Add it under MaterialApp. | |
class KeyboardBarInput extends StatefulWidget { | |
final Widget child; |
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
trying to see if it works. |
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' as math; | |
import 'dart:ui'; | |
import 'package:flutter/material.dart'; | |
/// Gradient Shader in outline input borders. | |
/// Doesn't merge solid color BorderSide and GradientBorderSide. | |
class OutlineInputBorderShader extends OutlineInputBorder { | |
const OutlineInputBorderShader({ | |
GradientBorderSide borderSide = const GradientBorderSide(), |
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' as math; | |
import 'package:flutter/material.dart'; | |
double deg2rad(double deg) => deg * math.pi / 180; | |
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:flutter/material.dart'; | |
import 'package:graphx/graphx.dart'; | |
abstract class SampleData { | |
static Future<void> cacheSvgData() async { | |
for (var string in boxIcons) { | |
final result = await SvgUtils.svgDataFromString(string); | |
boxSvgs.add(result); | |
} | |
} |
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:get/get.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { |
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' as math; | |
/// see https://en.wikipedia.org/wiki/Levenshtein_distance | |
void main() { | |
/// terms distance can be used as threshold value when you filter similar results. | |
/// if the number of "editions" is low, you can suppose a typo and provide the "similar" | |
/// result (maybe using the `int` distance as a sorting method). | |
print(levenshtein('sittin', 'sitting')); | |
print(levenshtein('casa', 'calle')); | |
} |
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
/// new "custom" parameters: | |
/// -menuRadius: menu corner radius [BorderRadius] | |
/// -menuDecoration: background [BoxDecoration] | |
/// -menuPadding: menu vertical padding [EdgeInsets] | |
/// -menuClip: To clip (mask) menu's content [Clip.none] | |
/// -itemPadding: item's horizontal padding [EdgeInsets] | |
// Copyright 2014 The Flutter Authors. All rights reserved. | |
// Use of this source code is governed by a BSD-style license that can be |
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
/// live demo: https://graphx-gesture-simple.surge.sh | |
import 'package:flutter/material.dart'; | |
import 'package:graphx/graphx.dart'; | |
import 'package:graphx_zoompan/simple_zoom.dart'; | |
void main() { | |
runApp(AppSimpleZoom()); | |
} |
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:graphx/graphx.dart'; | |
import 'zoom_scene.dart'; | |
/// Live demo: | |
/// https://graphx-gesture-sample.surge.sh | |
/// | |
void main() { |