mirror of
https://github.com/pd4d10/git-touch.git
synced 2026-06-01 00:35:59 -05:00
27 lines
636 B
Dart
27 lines
636 B
Dart
import 'package:flutter/material.dart';
|
|
import '../providers/settings.dart';
|
|
|
|
class Link extends StatelessWidget {
|
|
final Widget child;
|
|
final GestureTapCallback onTap;
|
|
final Color bgColor;
|
|
|
|
Link({@required this.child, @required this.onTap, this.bgColor});
|
|
|
|
@override
|
|
Widget build(BuildContext context) {
|
|
return Material(
|
|
child: Ink(
|
|
color: bgColor ?? Colors.white,
|
|
child: InkWell(
|
|
splashColor: SettingsProvider.of(context).theme == ThemeMap.cupertino
|
|
? Colors.transparent
|
|
: null,
|
|
onTap: onTap,
|
|
child: child,
|
|
),
|
|
),
|
|
);
|
|
}
|
|
}
|