mirror of
https://github.com/iampawan/Flutter-Music-Player.git
synced 2025-05-17 17:15:57 +08:00
22 lines
512 B
Dart
22 lines
512 B
Dart
import 'dart:io';
|
|
import 'package:flutter/material.dart';
|
|
|
|
Widget avatar(File f, String title, MaterialColor color) {
|
|
return new Material(
|
|
borderRadius: new BorderRadius.circular(20.0),
|
|
elevation: 3.0,
|
|
child: f != null
|
|
? new Image.file(
|
|
f,
|
|
fit: BoxFit.cover,
|
|
)
|
|
: new CircleAvatar(
|
|
child: new Icon(
|
|
Icons.play_arrow,
|
|
color: Colors.white,
|
|
),
|
|
backgroundColor: color,
|
|
),
|
|
);
|
|
}
|