sample_data 0.1.0 sample_data: ^0.1.0 copied to clipboard
A new Flutter package that generated random sample data to test your application.
// Copyright 2019 The Chromium Authors. 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';
import 'package:sample_data/sample_data.dart';
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
@override
Widget build(BuildContext context) {
return MaterialApp(
title: 'Sample Data Example',
home: HomeWidget(),
);
}
}
class HomeWidget extends StatelessWidget {
@override
Widget build(BuildContext context) {
return Scaffold(
body: ListView.builder(
itemBuilder: (context, index) => ListTile(
contentPadding: const EdgeInsets.all(8),
leading: Image.asset(
kidsAvatar(),
package: 'sample_data',
),
title: Text(
userName(),
),
),
),
);
}
}