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
<?xml version="1.0" encoding="utf-8"?> | |
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android" | |
xmlns:app="http://schemas.android.com/apk/res-auto" | |
xmlns:tools="http://schemas.android.com/tools" | |
android:layout_width="match_parent" | |
android:layout_height="match_parent" | |
tools:context=".MainActivity"> | |
<LinearLayout | |
android:layout_width="match_parent" |
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
class _ScrollController extends ScrollController { | |
final attachedPositions = <ScrollPosition>{}; | |
ScrollController _scaffoldScrollController; | |
void init(BuildContext context) { | |
_scaffoldScrollController = PrimaryScrollController.of(context); | |
} | |
set scaffoldScrollController(ScrollController value) { | |
if (_scaffoldScrollController != value) { |
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
class DiacriticsHelper { | |
static final defaultDiacriticsRemovalap = [ | |
{ | |
'base': 'A', | |
'letters': | |
'\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u00C4\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F' | |
}, | |
{'base': 'AA', 'letters': '\uA732'}, | |
{'base': 'AE', 'letters': '\u00C6\u01FC\u01E2'}, | |
{'base': 'AO', 'letters': '\uA734'}, |
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:flare_flutter/flare.dart'; | |
import 'package:flare_flutter/flare_controls.dart'; | |
class MyControls extends FlareControls { | |
@override | |
void initialize(FlutterActorArtboard artboard) { | |
super.initialize(artboard); | |
play("first animation"); | |
} |
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
class ProgressPainter extends CustomPainter { | |
@override | |
void paint(Canvas canvas, Size size) { | |
double percent = 85; | |
Paint p = Paint() | |
..color = Colors.white24 | |
..style = PaintingStyle.stroke | |
..strokeCap = StrokeCap.round | |
..strokeWidth = 4.0; |
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
void showCupertinoPicker<T>(BuildContext context, | |
{bool isDatePicker = false, | |
List<T> options, | |
T selectedValue, | |
DateTime minDate, | |
DateTime lastDate, | |
DateTime initialDate, | |
Function(T) onChanged}) { | |
showCupertinoModalPopup( | |
context: 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
package io.ptech.cc.plugins.flutter; | |
import android.os.Handler; | |
import android.os.Looper; | |
import io.flutter.plugin.common.MethodChannel; | |
public class MethodResultWrapper implements MethodChannel.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
class AnimatedClock extends StatefulWidget { | |
final bool isToggled; | |
const AnimatedClock({ | |
Key key, | |
this.isToggled, | |
}) : super(key: key); | |
@override | |
_AnimatedClockState createState() => _AnimatedClockState(); | |
} |
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
class BackSwipe extends StatelessWidget { | |
final Widget child; | |
BackSwipe({Key key, this.child}) : super(key: key); | |
@override | |
Widget build(BuildContext context) { | |
double start = 0.0; | |
return GestureDetector( | |
onHorizontalDragStart: (details) => start = details.globalPosition.dx, |
NewerOlder