1

How the show keyword makes difference in theese two imports? The second one is that the IDE suggests to use but sometimes the first one is what in real code.

import 'package:flutter/foundation.dart' show kDebugMode;

vs

import 'package:flutter/foundation.dart';
rozerro
  • 5,787
  • 9
  • 46
  • 94

1 Answers1

2

The show keyword allows you to pick the class you want to use from the library, so basically that means you will only be able to use the KDebugMode class from the foundation library, while if you didn't write it you will be able to use all the classes in the foundation library

Omar Emad
  • 38
  • 4