This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
import 'package:intl/intl.dart'; | |
import 'package:flutter/material.dart'; | |
import 'package:fluids/plugins/weather/models/models.dart'; //custom data models | |
import 'package:fluids/utils/md_icons.dart'; //material design community icons | |
class CityForecast extends StatelessWidget { | |
final GlobalKey<AnimatedListState> _listKey = GlobalKey<AnimatedListState>(); | |
final String city; | |
final String state; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'dart:convert'; | |
void main() { | |
String aryString = | |
'{"data": "red, blue, green, red, yellow, deep orange, orange, blue, purple, green"}'; | |
Map map = jsonDecode(aryString); | |
String listString = map['data']; | |
List cats = listString.split(', '); | |
cats.sort(); | |
print(cats.toSet()); |