Flutter, import show keyword


import 'dart:convert' show JSON;

As far as I know the "show" keyword bring the only one class from library right

but I can`t find now JSON class where is it? I jumped to dart:convert and then I don`t see any on "Class JSON"

why is that?


As you have discovered, JSON is not a class from dart:convert. What you might want is json:

import 'dart:convert' show json;

Which is defined in the dart:convert librart in the json.dart file:

enter image description here

Answered By – Lulupointu

Answer Checked By – Marilyn (FlutterFixes Volunteer)

Leave a Reply

Your email address will not be published.