Skip to content

Commit

Permalink
refactor: list component
Browse files Browse the repository at this point in the history
  • Loading branch information
uswebk committed Sep 18, 2023
1 parent 2650bc2 commit df6be58
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions lib/components/list/basic_list_tile.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import 'dart:io';

import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class BasicListTile extends StatelessWidget {
const BasicListTile({super.key, this.leading, required this.title, this.subtitle, this.onTap});

final Widget? leading;
final Widget title;
final Widget? subtitle;
final Function()? onTap;

@override
Widget build(BuildContext context) {
return (Platform.isIOS)
? CupertinoListTile(leading: leading, title: title, subtitle: subtitle, onTap: onTap)
: ListTile(leading: leading, title: title, subtitle: subtitle, onTap: onTap);
}
}

0 comments on commit df6be58

Please sign in to comment.