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 FadeRoute<T> extends MaterialPageRoute<T> { | |
final bool fadeInitialRoute; | |
FadeRoute({ builder, settings, maintainState, fullscreenDialog, this.fadeInitialRoute = true}) | |
: super(builder: builder, settings: settings, maintainState: maintainState, fullscreenDialog: fullscreenDialog); | |
@override | |
bool get opaque => false; | |
@override |
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'; | |
void main() => runApp(new MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return new MaterialApp( | |
title: 'Flutter Demo', | |
theme: new ThemeData( |
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:meta/meta.dart'; | |
const List<TabItem> TabItems = const <TabItem>[ | |
const TabItem(title: 'Home', icon: Icons.home), | |
const TabItem(title: 'Gallery', icon: Icons.image), | |
const TabItem(title: 'Settings', icon: Icons.settings) | |
]; | |
class MyApp extends StatefulWidget { |
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:ui'; | |
import 'package:flutter/cupertino.dart'; | |
import 'package:flutter/material.dart'; | |
void main() { | |
runApp(MyApp()); | |
} | |
class MyApp extends StatelessWidget { |
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
Scrollable( | |
axisDirection: AxisDirection.right, | |
controller: _pageController, | |
physics: const PageScrollPhysics(parent: ClampingScrollPhysics()), | |
viewportBuilder: (BuildContext context, ViewportOffset offset) { | |
return LayoutBuilder( | |
builder: (context, constraints) { | |
offset.applyViewportDimension(constraints.maxWidth); | |
offset.applyContentDimensions(0.0, constraints.maxWidth); | |
return AnimatedBuilder( |
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'; | |
void main() { | |
runApp(const MyApp()); | |
} | |
class MyApp extends StatelessWidget { | |
const MyApp({super.key}); | |
@override |
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:flutter/rendering.dart'; | |
void main() => runApp(const ExampleApp()); | |
class ExampleApp extends StatelessWidget { | |
const ExampleApp({super.key}); | |
@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
// MIT License | |
// | |
// Copyright (c) 2022 Fré Dumazy & Simon Lightfoot | |
// | |
// Permission is hereby granted, free of charge, to any person obtaining a copy | |
// of this software and associated documentation files (the "Software"), to deal | |
// in the Software without restriction, including without limitation the rights | |
// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
// copies of the Software, and to permit persons to whom the Software is | |
// furnished to do so, subject to the following conditions: |
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
// Please solve this one. | |
// | |
// If I tap on any one of the eight areas app navigate to “PageTwo()” | |
// | |
// If I tap on four of the areas simultaneous | |
// (I use four fingers to tap with), I want to navigate the “SecretPage()“. | |
// | |
// Lets pick “One”, “Two”, “Five” and “Six” as the as the secrete tap areas. | |
import 'package:flutter/foundation.dart'; |
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
/// Reference (https://github.com/FilledStacks/markdown_fade_bounty/pull/6) | |
/// This widget, `FadeRevealMarkdownDifference`, is designed to display a series of markdown versions, | |
/// highlighting the differences between them. The issue being encountered is that the `previousText` is | |
/// currently showing a pulse animation, which is not required or expected behavior. The pulse effect | |
/// should only apply to the newly added portion of the text (`newText`). The goal is to have `previousText` | |
/// remain static while only the new changes (`newText`) fade in or animate. | |
/// | |
/// The expected behavior is for `previousText` to remain static and unanimated, and only `newText` | |
/// should be subject to the fade-in effect. | |
/// |
OlderNewer