dart: Maps & Sets/ basic Data types

Darcy Daeseok YU ·2022년 12월 1일
0
post-custom-banner
  1. Maps
  var player = {
    'name': 'player1',
    'xp': 19.99,
    'superpower': false,
  };

  Map<int, bool> player1 = {
    1: true,
    2: false,
    3: true,
  };
  
  
  // List types
  
    List<Map<String, Object>> players = [
    player,
    {
      'name': 'player2',
      'xp': 19.99,
      'superpower': true,
    },
  ];
  1. Sets
 Set<int> numbers = {
    1,
    2,
    3,
    4,
    5,
	// unique key once
  };
profile
React, React-Native https://darcyu83.netlify.app/

0개의 댓글