Dart Solution
\nclass OrderedStream {\n    late final List<String> data;\n    int pointer = 0;\n\n  OrderedStream(int n) {\n      data = List<String>.filled(n, \'\');\n  }\n 
```\nclass OrderedStream {\n    late final List<String> data;\n    int pointer = 0;\n\n  OrderedStream(int n) {\n      data = List<String>.filled(n, \'\');\n  }\n  \n  List<String> insert(int idKey, String value) {\n      data[idKey-1] = value;\n      var result = <String>[];\n      while(data[pointer]!=\'\' ){\n          result.add(data[pointer]);\n          if( pointer+1 < data.length){ \n          pointer++;\n          }else{\n            break;\n          }\n      }\n    return result;\n\n  }\n}\n\n/**\n * Your OrderedStream object will be instantiated and called as such:\n * OrderedStream obj = OrderedStream(n);\n * List<String> param1 = obj.insert(idKey,value);\n */\n```
['Array', 'Dart']