Skip to content

Instantly share code, notes, and snippets.

@kenreilly
Last active July 5, 2019 20:14
Show Gist options
  • Save kenreilly/4531c100a74bc0eb9d668d37433b5cb1 to your computer and use it in GitHub Desktop.
Save kenreilly/4531c100a74bc0eb9d668d37433b5cb1 to your computer and use it in GitHub Desktop.
Item class and items definition in Flutter custom scroll project
import 'package:flutter/material.dart';
class Item {
String name;
String description;
MaterialColor color;
IconData icon;
Item(this.name, this.description, this.color, this.icon);
}
List<Item> items = [
Item('A', "Something cool", Colors.amber, Icons.ac_unit),
Item('B', "Hey, why not?", Colors.cyan, Icons.add_photo_alternate),
Item('C', "This might be OK", Colors.indigo, Icons.airplay),
Item('D', "Totally awesome", Colors.green, Icons.crop),
Item('E', "Rockin out", Colors.pink, Icons.album),
Item('F', "Take a look", Colors.blue, Icons.adb)
];
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment