• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2013 The Flutter Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 #include "flutter/lib/io/dart_io.h"
6 
7 #include "third_party/dart/runtime/include/bin/dart_io_api.h"
8 #include "third_party/dart/runtime/include/dart_api.h"
9 
10 using tonic::ToDart;
11 
12 namespace flutter {
13 
InitForIsolate()14 void DartIO::InitForIsolate() {
15   Dart_Handle result = Dart_SetNativeResolver(
16       Dart_LookupLibrary(ToDart("dart:io")), dart::bin::LookupIONative,
17       dart::bin::LookupIONativeSymbol);
18   if (Dart_IsError(result)) {
19     Dart_PropagateError(result);
20   }
21 }
22 
23 }  // namespace flutter
24