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
// Seventh AppBar Parts example: ReszingHeaderSliver with ContactBar.prototype | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/scheduler.dart'; | |
class _ContactBarButton extends StatelessWidget { |
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
// Fifth AppBarParts example - auto scroll | |
// This demo must be run in a simulator or on a mobile device | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/scheduler.dart'; |
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/scheduler.dart'; | |
// The pinned item at the top of the list. This is an implicitly | |
// animated widget: when the opacity changes the title and divider | |
// fade in or out. |
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/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/scheduler.dart'; | |
// The pinned item at the top of the list. This is an implicitly | |
// animated widget: when the opacity changes the title and divider | |
// fade in or out. |
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'; | |
// The pinned item at the top of the list. This is an implicitly | |
// animated widget: when the opacity changes the title and divider | |
// fade in or out. | |
class TitleBar extends StatelessWidget { | |
const TitleBar({ super.key, required this.opacity, required this.child }); | |
final double opacity; | |
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
import 'package:flutter/material.dart'; | |
// The pinned item at the top of the list. This is an implicitly | |
// animated widget: when the opacity changes the title and divider | |
// fade in or out. | |
class TitleBar extends StatelessWidget { | |
const TitleBar({ super.key, required this.opacity, required this.child }); | |
final double opacity; | |
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
// First AppBar Parts example: iOS Settings app layout | |
// https://gist.github.com/HansMuller/6d272ec6712a045ab2121bc8fb324797 | |
import 'package:flutter/material.dart'; | |
// The pinned item at the top of the list. This is an implicitly | |
// animated widget: when the opacity changes the title and divider | |
// fade in or out. | |
class TitleBar extends StatelessWidget { |
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'; | |
void main() { | |
runApp(const ThemeDataExampleApp()); | |
} | |
// This app's theme specifies an overall ColorScheme as well as overrides | |
// for the default configuration of FloatingActionButtons. To customize | |
// the appearance of other components, add additional component specific | |
// themes, rather than tweaking the color scheme. |
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'; | |
/// Flutter code sample for [ReorderableListView]. | |
void main() { | |
runApp(const ReorderableApp()); | |
} | |
class ReorderableApp extends StatelessWidget { | |
const ReorderableApp({ super.key }); |
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
// https://gist.github.com/HansMuller/7e0a38380d059058b71d6e7b03b9cd6d | |
/* | |
PinnedSliver is a distillation of SliverPersistentHeader | |
that just supports the pinned:true configuration and whose size is | |
the size of the child. | |
The child widget is built with a callback rather than a sliver | |
delegate subclass. The callback is passed the parent BuildContext |