added cargo files
This commit is contained in:
43
PinePods-0.8.2/mobile/lib/ui/widgets/slider_handle.dart
Normal file
43
PinePods-0.8.2/mobile/lib/ui/widgets/slider_handle.dart
Normal file
@@ -0,0 +1,43 @@
|
||||
// Copyright 2020 Ben Hills and the project contributors. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
/// This class generates a simple 'handle' icon that can be added on widgets such as
|
||||
/// scrollable sheets and bottom dialogs.
|
||||
///
|
||||
/// When running with a screen reader, the handle icon becomes selectable with an
|
||||
/// optional label and tap callback. This makes it easier to open/close.
|
||||
class SliderHandle extends StatelessWidget {
|
||||
final GestureTapCallback? onTap;
|
||||
final String label;
|
||||
|
||||
const SliderHandle({
|
||||
super.key,
|
||||
this.onTap,
|
||||
this.label = '',
|
||||
});
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Semantics(
|
||||
liveRegion: true,
|
||||
label: label,
|
||||
child: GestureDetector(
|
||||
onTap: onTap,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.all(8.0),
|
||||
child: Container(
|
||||
width: 36,
|
||||
height: 4,
|
||||
decoration: BoxDecoration(
|
||||
color: Theme.of(context).hintColor,
|
||||
borderRadius: const BorderRadius.all(Radius.circular(4.0)),
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user