This file contains 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 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 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 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 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 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 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 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() { |
This file contains 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
/// Note: | |
/// A simple fix for this case scenario of local controller lifecycle, might be | |
/// to separate the `global:false` logic here: | |
/// https://github.com/jonataslaw/getx/blob/07ad5d7f9e726f181800359d0218b44e5967ccf8/lib/get_state_manager/src/simple/get_state.dart#L177 | |
// ... | |
// if (_isCreator! || widget.assignId) { | |
// if (widget.autoRemove) { | |
// /// if the Controller is flagged as "local", run manually `onClose()`. | |
// if( !widget.global ){ |
This file contains 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 at: | |
/// | |
/// https://roi-gradient-picker.surge.sh/ | |
/// | |
/// | |
import 'dart:ui'; | |
import 'package:flutter/material.dart' hide Image; | |
import 'package:flutter/rendering.dart'; |