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
// From the original Flutter gallery demo | |
// dev/integration_tests/flutter_gallery/lib/demo/material/page_selector_demo.dart | |
import 'package:flutter/material.dart'; | |
class _PageSelector extends StatelessWidget { | |
const _PageSelector({ this.icons }); | |
final List<Icon>? icons; |
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
// A CoordinatedSliver that auto-scrolls to align itself with the | |
// top of the viewport when a scroll gesture leaves it partially visible. | |
// | |
// This demo must be run in a simulator or on a mobile device | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
import 'package:flutter/scheduler.dart'; | |
class Item 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
// ReszingHeaderSliver AppBar Parts example: contacts version with autoscroll | |
// New coordinator API; coordinated slivers report layout info directly. | |
// https://gist.github.com/HansMuller/fd7b154108a142a0ea2ef1be24d09e94 | |
// dartpad.dev/?id=fd7b154108a142a0ea2ef1be24d09e94 | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.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
// PinnedHeaderSliver demo | |
// https://github.com/flutter/flutter/pull/143196 | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
void main() { |
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
// Settings app bar demo with auto-scroll and new coordinator API. | |
// 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
// ReszingHeaderSliver AppBar Parts example: contacts version with autoscroll | |
// New coordinator API; coordinated slivers report layout info directly. | |
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
// ReszingHeaderSliver AppBar Parts example: contacts version with autoscroll hack | |
// https://gist.github.com/HansMuller/829c0ede0b28e305aa1545edd8aa37f9 | |
// dartpad.dev/?id=829c0ede0b28e305aa1545edd8aa37f9 | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.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
// ReszingHeaderSliver AppBar Parts example: contacts version (no autoscroll) | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
class _ContactBarButton extends StatelessWidget { | |
const _ContactBarButton(this.icon, this.label); |
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
// ReszingHeaderSliver AppBar Parts example: simple version | |
import 'dart:math' as math; | |
import 'package:flutter/foundation.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:flutter/rendering.dart'; | |
// A placeholder SliverList of 50 items. | |
class ItemList extends StatelessWidget { |