Issue 1:
A few Days Ago, everything was fine but recently I'm starting facing to get Flutter Packages. Please have a look and help me out. Optional => I'm not from China

Creating project test_run...
test_run\.gitignore (created)
test_run\.idea\libraries\Dart_SDK.xml (created)
test_run\.idea\libraries\Flutter_for_Android.xml (created)
test_run\.idea\libraries\KotlinJavaRuntime.xml (created)
test_run\.idea\modules.xml (created)
test_run\.idea\runConfigurations\main_dart.xml (created)
test_run\.idea\workspace.xml (created)
test_run\.metadata (created)
test_run\android\app\build.gradle (created)
test_run\android\app\src\main\java\com\example\testrun\MainActivity.java (created)
test_run\android\build.gradle (created)
test_run\android\test_run_android.iml (created)
test_run\android\app\src\main\AndroidManifest.xml (created)
test_run\android\app\src\main\res\drawable\launch_background.xml (created)
test_run\android\app\src\main\res\mipmap-hdpi\ic_launcher.png (created)
test_run\android\app\src\main\res\mipmap-mdpi\ic_launcher.png (created)
test_run\android\app\src\main\res\mipmap-xhdpi\ic_launcher.png (created)
test_run\android\app\src\main\res\mipmap-xxhdpi\ic_launcher.png (created)
test_run\android\app\src\main\res\mipmap-xxxhdpi\ic_launcher.png (created)
test_run\android\app\src\main\res\values\styles.xml (created)
test_run\android\gradle\wrapper\gradle-wrapper.properties (created)
test_run\android\gradle.properties (created)
test_run\android\settings.gradle (created)
test_run\ios\Runner\AppDelegate.h (created)
test_run\ios\Runner\AppDelegate.m (created)
test_run\ios\Runner\main.m (created)
test_run\ios\Runner.xcodeproj\project.pbxproj (created)
test_run\ios\Runner.xcodeproj\xcshareddata\xcschemes\Runner.xcscheme (created)
test_run\ios\Flutter\AppFrameworkInfo.plist (created)
test_run\ios\Flutter\Debug.xcconfig (created)
test_run\ios\Flutter\Release.xcconfig (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Contents.json (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-1024x1024@1x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@1x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@2x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-20x20@3x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@1x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@2x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-29x29@3x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@1x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@2x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-40x40@3x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-60x60@2x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-60x60@3x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-76x76@1x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-76x76@2x.png (created)
test_run\ios\Runner\Assets.xcassets\AppIcon.appiconset\Icon-App-83.5x83.5@2x.png (created)
test_run\ios\Runner\Assets.xcassets\LaunchImage.imageset\Contents.json (created)
test_run\ios\Runner\Assets.xcassets\LaunchImage.imageset\LaunchImage.png (created)
test_run\ios\Runner\Assets.xcassets\LaunchImage.imageset\LaunchImage@2x.png (created)
test_run\ios\Runner\Assets.xcassets\LaunchImage.imageset\LaunchImage@3x.png (created)
test_run\ios\Runner\Assets.xcassets\LaunchImage.imageset\README.md (created)
test_run\ios\Runner\Base.lproj\LaunchScreen.storyboard (created)
test_run\ios\Runner\Base.lproj\Main.storyboard (created)
test_run\ios\Runner\Info.plist (created)
test_run\ios\Runner.xcodeproj\project.xcworkspace\contents.xcworkspacedata (created)
test_run\ios\Runner.xcworkspace\contents.xcworkspacedata (created)
test_run\lib\main.dart (created)
test_run\test_run.iml (created)
test_run\pubspec.yaml (created)
test_run\README.md (created)
test_run\test\widget_test.dart (created)
_Running "flutter packages get" in test_run...
Got socket error trying to find package cupertino_icons at https://pub.dartlang.org.
pub get failed (69) -- attempting retry 1 in 1 second..._

Issue 2:
Problem

The Camera Preview doesn't load on my iPhone Xs, or my iPhone 8 Plus, when I'm using the ResolutionPreset.high setting. There is some weird functionality even when I tried running the sample app where it would stop working half the time and then start working if I either re checked out the code base, or if I messed around with the bundle identifier. Even when the camera preview isn't working the phone will still take pictures properly using this resolution, and it works fine for the most part on Android. (Samsung devices are buggy, but that's another problem). Medium and low resolutions work properly. It works fine on my iPhone 6s. I have a feeling it has something to do with the dual camera setup of the newer phones. All the log information below is from the iPhone Xs

Code

import 'dart:io';

import 'package:camera/camera.dart';
import 'package:flutter/material.dart';
import 'package:flutter_login/image_viewer.dart';
import 'package:path_provider/path_provider.dart';
import 'package:flutter/painting.dart';
import 'package:device_info/device_info.dart';

class CloudVisionPage extends StatefulWidget {
static String tag = 'cloud-vision-page';

@override
_CloudVisionPageState createState() => _CloudVisionPageState();
}

class _CloudVisionPageState extends State<CloudVisionPage> {
CameraController controller;
List<CameraDescription> _cameras;
bool _isReady = false;
final GlobalKey<ScaffoldState> _scaffoldKey = GlobalKey<ScaffoldState>();

@override
void initState() {
super.initState();
_setUpCamera();
}

void _setUpCamera() async {
try {
// initialize cameras.
_cameras = await availableCameras();
// initialize camera controllers.
// Current bug for high / medium with samsung devices.
if (Platform.isAndroid) {
DeviceInfoPlugin deviceInfo = DeviceInfoPlugin();
AndroidDeviceInfo androidDeviceInfo = await deviceInfo.androidInfo;
if (androidDeviceInfo.manufacturer.toLowerCase() == "samsung") {
controller = CameraController(_cameras[0], ResolutionPreset.low);
} else {
controller = CameraController(_cameras[0], ResolutionPreset.high);
}
} else {
controller = CameraController(_cameras[0], ResolutionPreset.high);
}

await controller.initialize();
} on CameraException catch (_) {
// do something on error.
}
if (!mounted) return;
setState(() {
_isReady = true;
});
}

@override
void dispose() {
controller?.dispose();
super.dispose();
}

Widget cameraPreview() {
return AspectRatio(
aspectRatio:
controller.value.aspectRatio,
child: CameraPreview(controller)
);
}

Widget floatingButton() {
return FloatingActionButton(
backgroundColor: Colors.blue,
onPressed: _onPictureButtonPressed,
child: Icon(
Icons.camera,
),
);
}

void _onPictureButtonPressed() {
_takePicture().then((String filePath) {
if (mounted) {
if (filePath != null) {
Navigator.push(
context,
MaterialPageRoute(builder: (context) => ImagePage(filePath)),
);
}
}
});
}

void showInSnackBar(String message) {
_scaffoldKey.currentState.showSnackBar(SnackBar(content: Text(message)));
}

String timestamp() => DateTime.now().millisecondsSinceEpoch.toString();

Future<String> _takePicture() async {
if (!controller.value.isInitialized) {
return null;
}
// This is the private app directory.
final Directory extDir = await getApplicationDocumentsDirectory();

final String dirPath = '${extDir.path}/Pictures/flutter_test';
await Directory(dirPath).create(recursive: true);
final String filePath = '$dirPath/${"test_image"}.jpg';
// Delete file to override image.
File imageFile = File(filePath);
if (imageFile.existsSync()) {
imageFile.deleteSync(recursive: false);
}

// Must clear this because flutter caches the images behind the scenes.
imageCache.clear();

if (controller.value.isTakingPicture) {
// A capture is already pending, do nothing.
return null;
}

try {
await controller.takePicture(filePath);
} on CameraException catch (e) {
_showCameraException(e);
return null;
}
return filePath;
}

void _showCameraException(CameraException e) {
logError(e.code, e.description);
showInSnackBar('Error: ${e.code}\n${e.description}');
}

void logError(String code, String message) =>
print('Error: $code\nError Message: $message');

@override
Widget build(BuildContext context) {
if (_isReady == false ||
controller == null || !controller.value.isInitialized) {
return Container();
}
return Scaffold(
key: _scaffoldKey,
body: SafeArea(
child: Column(
crossAxisAlignment: CrossAxisAlignment.center,
mainAxisAlignment: MainAxisAlignment.center,
children: <Widget>[
Center(
child: cameraPreview(),
),
SizedBox(height: 8.0,),
floatingButton(),
],
),
),
);
}
}

Logs

flutter run --verbose

https://gist.github.com/dwach414/39f462cabe2e740f06a818dd9f5a7f60

flutter analyze

Analyzing flutter-login-poc...
No issues found! (ran in 1.4s)

flutter doctor -v

[✓] Flutter (Channel beta, v1.0.0, on Mac OS X 10.14.2 18C54, locale en-US)
• Flutter version 1.0.0 at /Users/beemo/dev/flutter
• Framework revision 5391447fae (2 weeks ago), 2018-11-29 19:41:26 -0800
• Engine revision 7375a0f414
• Dart version 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
• Android SDK at /Users/beemo/Library/Android/sdk
• Android NDK at /Users/beemo/Library/Android/sdk/ndk-bundle
• Platform android-28, build-tools 28.0.3
• ANDROID_HOME = /Users/beemo/Library/Android/sdk
• Java binary at: /Applications/Android Studio.app/Contents/jre/jdk/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 10.1, Build version 10B61
• ios-deploy 1.9.4
• CocoaPods version 1.5.3

[✓] Android Studio (version 3.2)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 31.1.1
• Dart plugin version 181.5656
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1136-b06)

[✓] Connected device (1 available)
• Daniel’s iPhone • 00008020-00165D420128002E • ios • iOS 12.1

• No issues found!