fixed_collections 0.1.0-beta copy "fixed_collections: ^0.1.0-beta" to clipboard
fixed_collections: ^0.1.0-beta copied to clipboard

Collections you can't modify

example/main.dart

import 'package:fixed_collections/fixed_collections.dart';

void main(List<String> arguments) {
  final strings = FixedList<String>(['Example']);

  //add got cancelled
  strings.add('hi');

  //addAll - cancelled!
  strings.addAll(iterable)

  //I don't think so
  strings[0] = "lo";

  //Oh no you didn't!
  strings.insert(1, 'something');

  //You can't do that
  strings.fillRange(0, 1, 'something else');

  //That's nasty
  strings.sort();

  //No!
  strings.shuffle();

  //No soup for you!
  strings.clear();
}