<h2 dir="auto">Steps to Reproduce</h2>
<ul dir="auto">
<li>Android Video Plays correctly in either portrait or landscape video modes</li>
<li>iOS Video is warped on portrait and landscape looks normal.</li>
<li>It is not accounting for orientation.<br>
when you record a video in landscape with the volume buttons facing up on iPhone and go to the video controller to play the video, it is upside down. If you take a video in landscape with the lock button facing up the video looks normal.</li>
</ul>
<p dir="auto">dependencies in <code class="notranslate">pubspec.yaml</code></p>
<div class="highlight highlight-source-yaml notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="dependencies:
  flutter:
    sdk: flutter
  async: &quot;^2.0.6&quot;
  cupertino_icons: ^0.1.0
  url_launcher: &quot;^3.0.0&quot;
  intl: 0.15.4
  local_auth: &quot;^0.2.0&quot;
  shared_preferences: &quot;^0.4.0&quot;
  firebase_core: &quot;^0.2.3&quot;
  firebase_analytics: &quot;^0.3.3&quot;
  material_search: &quot;^0.2.3&quot;
  flutter_webview_plugin: &quot;^0.1.5&quot;
  device_info: &quot;^0.2.0&quot;
  path_provider: &quot;^0.4.0&quot;
  path: &quot;^1.5.1&quot;
  video_player: &quot;0.5.2&quot;
  dio: &quot;^0.0.12&quot;
  get_version:
    git:
      url: git://github.com/AppleEducate/get_version
  media_picker:
    git:
      url: git://github.com/AppleEducate/media_picker"><pre class="notranslate"><span class="pl-ent">dependencies</span>:
  <span class="pl-ent">flutter</span>:
    <span class="pl-ent">sdk</span>: <span class="pl-s">flutter</span>
  <span class="pl-ent">async</span>: <span class="pl-s"><span class="pl-pds">"</span>^2.0.6<span class="pl-pds">"</span></span>
  <span class="pl-ent">cupertino_icons</span>: <span class="pl-s">^0.1.0</span>
  <span class="pl-ent">url_launcher</span>: <span class="pl-s"><span class="pl-pds">"</span>^3.0.0<span class="pl-pds">"</span></span>
  <span class="pl-ent">intl</span>: <span class="pl-s">0.15.4</span>
  <span class="pl-ent">local_auth</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.2.0<span class="pl-pds">"</span></span>
  <span class="pl-ent">shared_preferences</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.4.0<span class="pl-pds">"</span></span>
  <span class="pl-ent">firebase_core</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.2.3<span class="pl-pds">"</span></span>
  <span class="pl-ent">firebase_analytics</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.3.3<span class="pl-pds">"</span></span>
  <span class="pl-ent">material_search</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.2.3<span class="pl-pds">"</span></span>
  <span class="pl-ent">flutter_webview_plugin</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.1.5<span class="pl-pds">"</span></span>
  <span class="pl-ent">device_info</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.2.0<span class="pl-pds">"</span></span>
  <span class="pl-ent">path_provider</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.4.0<span class="pl-pds">"</span></span>
  <span class="pl-ent">path</span>: <span class="pl-s"><span class="pl-pds">"</span>^1.5.1<span class="pl-pds">"</span></span>
  <span class="pl-ent">video_player</span>: <span class="pl-s"><span class="pl-pds">"</span>0.5.2<span class="pl-pds">"</span></span>
  <span class="pl-ent">dio</span>: <span class="pl-s"><span class="pl-pds">"</span>^0.0.12<span class="pl-pds">"</span></span>
  <span class="pl-ent">get_version</span>:
    <span class="pl-ent">git</span>:
      <span class="pl-ent">url</span>: <span class="pl-s">git://github.com/AppleEducate/get_version</span>
  <span class="pl-ent">media_picker</span>:
    <span class="pl-ent">git</span>:
      <span class="pl-ent">url</span>: <span class="pl-s">git://github.com/AppleEducate/media_picker</span></pre></div>
<h3 dir="auto">Usage</h3>
<div class="highlight highlight-source-dart notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="import 'dart:async';
import 'package:async/async.dart';
import 'dart:io';
import 'package:path/path.dart';
import 'dart:convert';
import 'package:http/http.dart' as http;
import 'package:flutter/material.dart';
import 'package:media_picker/media_picker.dart';
import 'package:video_player/video_player.dart';
import 'package:Unify_Mobile/globals.dart' as globals;
import 'package:Unify_Mobile/menu/videodetails.dart';
import 'package:dio/dio.dart';

class CameraPage extends StatefulWidget {
  @override
  _CameraPageState createState() =&gt; new _CameraPageState();
}

// State for managing fetching name data over HTTP
class _CameraPageState extends State&lt;CameraPage&gt; {
  final GlobalKey&lt;ScaffoldState&gt; _scaffoldKey = new GlobalKey&lt;ScaffoldState&gt;();
  Future&lt;File&gt; _mediaFile;
  File _uploadFile;
  bool isVideo = false;
  VideoPlayerController _controller;
  VoidCallback listener;
  bool isPlaying = false;

  void _onImageButtonPressed(ImageSource source) {
    setState(() {
      if (_controller != null) {
        _controller.setVolume(0.0);
        _controller.removeListener(listener);
      }
      _mediaFile = MediaPicker.pickVideo(source: source).then((File _file) {
        _controller = VideoPlayerController.file(_file)
          ..addListener(listener)
          ..setVolume(1.0)
          ..initialize()
          ..setLooping(true)
          ..play();
        setState(() {
          isPlaying = true;
          _uploadFile = _file;
        });
      });
    });
  }

  @override
  void deactivate() {
    if (_controller != null) {
      _controller.setVolume(0.0);
      _controller.removeListener(listener);
    }
    super.deactivate();
  }

  @override
  void dispose() {
    if (_controller != null) {
      _controller.dispose();
    }
    super.dispose();
  }

  @override
  void initState() {
    super.initState();
    listener = () {
      setState(() {});
    };
  }

  Widget _previewVideo(VideoPlayerController controller) {
    if (controller == null) {
      isPlaying = false;
      return const Text('Please Select or Record a Video.');
    } else if (controller.value.initialized) {
      return InkWell(
          child: Padding(
            padding: const EdgeInsets.all(10.0),
            child: AspectRatio(
              aspectRatio:
                  controller.value.size.width / controller.value.size.height,
              child: VideoPlayer(
                controller,
              ),
            ),
          ),
          onTap: () {
            if (isPlaying) {
              _controller.pause();
              isPlaying = false;
            } else {
              _controller.play();
              isPlaying = true;
            }
          });
    } else {
      isPlaying = false;
      return const Text('Error Loading Video');
    }
  }

  Future uploadVideo(BuildContext context, File _uploadFile, String name,
      String description) async {
    final _name = name;
    final _description = description;
    if (_controller == null) {
      globals.Utility
          .showAlertPopup(context, &quot;Info&quot;, &quot;Video Required for Upload!&quot;);
    } else {
      final _ks = await globals.Utility.getKalturaSession();
      //  Add Video
      String _token = &quot;&quot;;
      await http
          .get(
              'https://www.kaltura.com/api_v3/service/uploadtoken/action/add?ks=$_ks&amp;format=1')
          .then((response) {
        Map&lt;String, dynamic&gt; _json = json.decode(response.body);
        _token = _json['id'].toString();
        print('&quot;Token: $_token');
      });

      //  Upload Video
      String _url =
          &quot;https://www.kaltura.com/api_v3/service/uploadtoken/action/upload?ks=$_ks&amp;format=1&amp;uploadTokenId=$_token&amp;resume=false&amp;finalChunk=true&amp;resumeAt=-1&quot;;
      print(&quot;Path: &quot; + _uploadFile.uri.toString());
      
      await uploadFile(_url, _uploadFile, 'fileData');

      //  Update Video Info (Name, Desctiption, Tags)
      var _formName = Uri.encodeQueryComponent(r'mediaEntry[name]');
      var _formDesription =
          Uri.encodeQueryComponent(r'mediaEntry[description]');
      var _formTags = Uri.encodeQueryComponent(r'mediaEntry[tags]');
      var _formCatagory = Uri.encodeQueryComponent(r'mediaEntry[categories]');
      var _formType = Uri.encodeQueryComponent(r'mediaEntry[mediaType]');
      String _request =
          'https://www.kaltura.com/api_v3/service/media/action/addFromUploadedFile?ks=$_ks&amp;format=1&amp;$_formTags=${globals.userCompanyID}&amp;$_formName=$_name&amp;$_formDesription=$_description&amp;uploadTokenId=$_token&amp;$_formCatagory=Unapproved&amp;$_formType=1';
      print(_request);
      await http.get(_request).then((response) {
        print('Updated Info...\n' + response.body.toString());
        Map&lt;String, dynamic&gt; _json = json.decode(response.body);
        //  Verify Upload
         _scaffoldKey.currentState.hideCurrentSnackBar();
        globals.videoID = &quot;&quot; + _json[&quot;id&quot;].toString();
        Navigator.pop(context);
      });
    }
  }

  Future uploadFile(String url, File file, String name) async {
      var stream =
          new http.ByteStream(DelegatingStream.typed(file.openRead()));
      var length = await file.length();
      var uri = Uri.parse(url);
      var request = new http.MultipartRequest(&quot;POST&quot;, uri);
      var multipartFile = new http.MultipartFile(name, stream, length,
          filename: basename(file.path));
      request.files.add(multipartFile);
      var response = await request.send();
      print(response.statusCode);
      response.stream.transform(utf8.decoder).listen((value) {
        print(value);
      });
  }

  void _uploadVideo(BuildContext context) async {
    final snackbar = new SnackBar(
      duration: new Duration(seconds: 20),
      content: new Row(
        children: &lt;Widget&gt;[
          new CircularProgressIndicator(),
          new Text(&quot;  Uploading...&quot;)
        ],
      ),
    );
    _scaffoldKey.currentState.showSnackBar(snackbar);
    await uploadVideo(context, _uploadFile, _nameController.text.toString(),
        _descController.text.toString());
    _scaffoldKey.currentState.hideCurrentSnackBar();
    //  Navigator.pop(context);
  }

  void handelTextChange(String value) {
    setState(() {});
  }

  final TextEditingController _nameController = new TextEditingController();
  final TextEditingController _descController = new TextEditingController();
  @override
  Widget build(BuildContext context) {
    return Scaffold(
      key: _scaffoldKey,
      appBar: AppBar(
        title: const Text('Video Upload'),
        backgroundColor: Colors.white,
        actions: &lt;Widget&gt;[
          new IconButton(
            icon: new Icon(
              Icons.help,
            ),
            onPressed: () {
              globals.Utility.showAlertPopup(context, 'Info',
                  &quot;Please Record in Landscape Mode for Best Results.\n\nFor Higher Quality Videos and to Prevent Data Loss, Capture and Edit a Video in the Camera App then Select the Video Here.\n\nOnce the Video is Uploaded it will be Avaliable in the 'Videos' Section After it Completes Processing.&quot;);
            },
          ),
          new IconButton(
              icon: new Icon(Icons.file_upload),
              onPressed: () {
                if (_nameController.text.toString().isNotEmpty &amp;&amp;
                    _descController.text.toString().isNotEmpty) {
                  _uploadVideo(context);
                } else {
                  globals.Utility.showAlertPopup(
                      context, &quot;Info&quot;, &quot;Name and Description Required!&quot;);
                }
              })
        ],
      ),
      body: new SingleChildScrollView(
        child: new ListBody(
          children: &lt;Widget&gt;[
            new ListTile(
              title: new TextField(
                controller: _nameController,
                onChanged: handelTextChange,
                decoration: new InputDecoration(
                  hintText: &quot;Name&quot;,
                ),
              ),
              trailing: _nameController.text.toString().isEmpty
                  ? new Icon(
                      Icons.error,
                      color: Colors.red,
                    )
                  : new Icon(
                      Icons.check_circle,
                      color: Colors.green,
                    ),
            ),
            new ListTile(
              title: new TextField(
                controller: _descController,
                onChanged: handelTextChange,
                decoration: new InputDecoration(
                  hintText: &quot;Description&quot;,
                ),
              ),
              trailing: _descController.text.toString().isEmpty
                  ? new Icon(
                      Icons.error,
                      color: Colors.red,
                    )
                  : new Icon(
                      Icons.check_circle,
                      color: Colors.green,
                    ),
            ),
            new Container(
              height: 20.0,
            ),
            new Center(
              child: _previewVideo(_controller),
            )
          ],
        ),
      ),
      floatingActionButton: Column(
        mainAxisAlignment: MainAxisAlignment.end,
        children: &lt;Widget&gt;[
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                _onImageButtonPressed(ImageSource.gallery);
              },
              heroTag: 'video0',
              tooltip: 'Pick Video from gallery',
              child: const Icon(Icons.video_library),
            ),
          ),
          Padding(
            padding: const EdgeInsets.only(top: 16.0),
            child: FloatingActionButton(
              backgroundColor: Colors.red,
              onPressed: () {
                _onImageButtonPressed(ImageSource.camera);
              },
              heroTag: 'video1',
              tooltip: 'Take a Video',
              child: const Icon(Icons.videocam),
            ),
          ),
        ],
      ),
    );
  }
}
"><pre class="notranslate"><span class="pl-k">import</span> <span class="pl-s">'dart:async'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:async/async.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'dart:io'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:path/path.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'dart:convert'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:http/http.dart'</span> <span class="pl-k">as</span> http;
<span class="pl-k">import</span> <span class="pl-s">'package:flutter/material.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:media_picker/media_picker.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:video_player/video_player.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:Unify_Mobile/globals.dart'</span> <span class="pl-k">as</span> globals;
<span class="pl-k">import</span> <span class="pl-s">'package:Unify_Mobile/menu/videodetails.dart'</span>;
<span class="pl-k">import</span> <span class="pl-s">'package:dio/dio.dart'</span>;

<span class="pl-k">class</span> <span class="pl-c1">CameraPage</span> <span class="pl-k">extends</span> <span class="pl-c1">StatefulWidget</span> {
  <span class="pl-k">@override</span>
  <span class="pl-c1">_CameraPageState</span> <span class="pl-en">createState</span>() <span class="pl-k">=&gt;</span> <span class="pl-k">new</span> <span class="pl-c1">_CameraPageState</span>();
}

<span class="pl-c">// State for managing fetching name data over HTTP</span>
<span class="pl-k">class</span> <span class="pl-c1">_CameraPageState</span> <span class="pl-k">extends</span> <span class="pl-c1">State</span>&lt;<span class="pl-c1">CameraPage</span>&gt; {
  <span class="pl-k">final</span> <span class="pl-c1">GlobalKey</span>&lt;<span class="pl-c1">ScaffoldState</span>&gt; _scaffoldKey <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">GlobalKey</span>&lt;<span class="pl-c1">ScaffoldState</span>&gt;();
  <span class="pl-c1">Future</span>&lt;<span class="pl-c1">File</span>&gt; _mediaFile;
  <span class="pl-c1">File</span> _uploadFile;
  <span class="pl-c1">bool</span> isVideo <span class="pl-k">=</span> <span class="pl-c1">false</span>;
  <span class="pl-c1">VideoPlayerController</span> _controller;
  <span class="pl-c1">VoidCallback</span> listener;
  <span class="pl-c1">bool</span> isPlaying <span class="pl-k">=</span> <span class="pl-c1">false</span>;

  <span class="pl-k">void</span> <span class="pl-en">_onImageButtonPressed</span>(<span class="pl-c1">ImageSource</span> source) {
    <span class="pl-en">setState</span>(() {
      <span class="pl-k">if</span> (_controller <span class="pl-k">!=</span> <span class="pl-c1">null</span>) {
        _controller.<span class="pl-en">setVolume</span>(<span class="pl-c1">0.0</span>);
        _controller.<span class="pl-en">removeListener</span>(listener);
      }
      _mediaFile <span class="pl-k">=</span> <span class="pl-c1">MediaPicker</span>.<span class="pl-en">pickVideo</span>(source<span class="pl-k">:</span> source).<span class="pl-en">then</span>((<span class="pl-c1">File</span> _file) {
        _controller <span class="pl-k">=</span> <span class="pl-c1">VideoPlayerController</span>.<span class="pl-en">file</span>(_file)
          ..<span class="pl-en">addListener</span>(listener)
          ..<span class="pl-en">setVolume</span>(<span class="pl-c1">1.0</span>)
          ..<span class="pl-en">initialize</span>()
          ..<span class="pl-en">setLooping</span>(<span class="pl-c1">true</span>)
          ..<span class="pl-en">play</span>();
        <span class="pl-en">setState</span>(() {
          isPlaying <span class="pl-k">=</span> <span class="pl-c1">true</span>;
          _uploadFile <span class="pl-k">=</span> _file;
        });
      });
    });
  }

  <span class="pl-k">@override</span>
  <span class="pl-k">void</span> <span class="pl-en">deactivate</span>() {
    <span class="pl-k">if</span> (_controller <span class="pl-k">!=</span> <span class="pl-c1">null</span>) {
      _controller.<span class="pl-en">setVolume</span>(<span class="pl-c1">0.0</span>);
      _controller.<span class="pl-en">removeListener</span>(listener);
    }
    <span class="pl-c1">super</span>.<span class="pl-en">deactivate</span>();
  }

  <span class="pl-k">@override</span>
  <span class="pl-k">void</span> <span class="pl-en">dispose</span>() {
    <span class="pl-k">if</span> (_controller <span class="pl-k">!=</span> <span class="pl-c1">null</span>) {
      _controller.<span class="pl-en">dispose</span>();
    }
    <span class="pl-c1">super</span>.<span class="pl-en">dispose</span>();
  }

  <span class="pl-k">@override</span>
  <span class="pl-k">void</span> <span class="pl-en">initState</span>() {
    <span class="pl-c1">super</span>.<span class="pl-en">initState</span>();
    listener <span class="pl-k">=</span> () {
      <span class="pl-en">setState</span>(() {});
    };
  }

  <span class="pl-c1">Widget</span> <span class="pl-en">_previewVideo</span>(<span class="pl-c1">VideoPlayerController</span> controller) {
    <span class="pl-k">if</span> (controller <span class="pl-k">==</span> <span class="pl-c1">null</span>) {
      isPlaying <span class="pl-k">=</span> <span class="pl-c1">false</span>;
      <span class="pl-k">return</span> <span class="pl-k">const</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Please Select or Record a Video.'</span>);
    } <span class="pl-k">else</span> <span class="pl-k">if</span> (controller.value.initialized) {
      <span class="pl-k">return</span> <span class="pl-c1">InkWell</span>(
          child<span class="pl-k">:</span> <span class="pl-c1">Padding</span>(
            padding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">all</span>(<span class="pl-c1">10.0</span>),
            child<span class="pl-k">:</span> <span class="pl-c1">AspectRatio</span>(
              aspectRatio<span class="pl-k">:</span>
                  controller.value.size.width <span class="pl-k">/</span> controller.value.size.height,
              child<span class="pl-k">:</span> <span class="pl-c1">VideoPlayer</span>(
                controller,
              ),
            ),
          ),
          onTap<span class="pl-k">:</span> () {
            <span class="pl-k">if</span> (isPlaying) {
              _controller.<span class="pl-en">pause</span>();
              isPlaying <span class="pl-k">=</span> <span class="pl-c1">false</span>;
            } <span class="pl-k">else</span> {
              _controller.<span class="pl-en">play</span>();
              isPlaying <span class="pl-k">=</span> <span class="pl-c1">true</span>;
            }
          });
    } <span class="pl-k">else</span> {
      isPlaying <span class="pl-k">=</span> <span class="pl-c1">false</span>;
      <span class="pl-k">return</span> <span class="pl-k">const</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Error Loading Video'</span>);
    }
  }

  <span class="pl-c1">Future</span> <span class="pl-en">uploadVideo</span>(<span class="pl-c1">BuildContext</span> context, <span class="pl-c1">File</span> _uploadFile, <span class="pl-c1">String</span> name,
      <span class="pl-c1">String</span> description) <span class="pl-k">async</span> {
    <span class="pl-k">final</span> _name <span class="pl-k">=</span> name;
    <span class="pl-k">final</span> _description <span class="pl-k">=</span> description;
    <span class="pl-k">if</span> (_controller <span class="pl-k">==</span> <span class="pl-c1">null</span>) {
      globals.<span class="pl-c1">Utility</span>
          .<span class="pl-en">showAlertPopup</span>(context, <span class="pl-s">"Info"</span>, <span class="pl-s">"Video Required for Upload!"</span>);
    } <span class="pl-k">else</span> {
      <span class="pl-k">final</span> _ks <span class="pl-k">=</span> <span class="pl-k">await</span> globals.<span class="pl-c1">Utility</span>.<span class="pl-en">getKalturaSession</span>();
      <span class="pl-c">//  Add Video</span>
      <span class="pl-c1">String</span> _token <span class="pl-k">=</span> <span class="pl-s">""</span>;
      <span class="pl-k">await</span> http
          .<span class="pl-en">get</span>(
              <span class="pl-s">'https://www.kaltura.com/api_v3/service/uploadtoken/action/add?ks=$<span class="pl-v">_ks</span>&amp;format=1'</span>)
          .<span class="pl-en">then</span>((response) {
        <span class="pl-c1">Map</span>&lt;<span class="pl-c1">String</span>, <span class="pl-c1">dynamic</span>&gt; _json <span class="pl-k">=</span> json.<span class="pl-en">decode</span>(response.body);
        _token <span class="pl-k">=</span> _json[<span class="pl-s">'id'</span>].<span class="pl-en">toString</span>();
        <span class="pl-en">print</span>(<span class="pl-s">'"Token: $<span class="pl-v">_token</span>'</span>);
      });

      <span class="pl-c">//  Upload Video</span>
      <span class="pl-c1">String</span> _url <span class="pl-k">=</span>
          <span class="pl-s">"https://www.kaltura.com/api_v3/service/uploadtoken/action/upload?ks=$<span class="pl-v">_ks</span>&amp;format=1&amp;uploadTokenId=$<span class="pl-v">_token</span>&amp;resume=false&amp;finalChunk=true&amp;resumeAt=-1"</span>;
      <span class="pl-en">print</span>(<span class="pl-s">"Path: "</span> <span class="pl-k">+</span> _uploadFile.uri.<span class="pl-en">toString</span>());
      
      <span class="pl-k">await</span> <span class="pl-en">uploadFile</span>(_url, _uploadFile, <span class="pl-s">'fileData'</span>);

      <span class="pl-c">//  Update Video Info (Name, Desctiption, Tags)</span>
      <span class="pl-k">var</span> _formName <span class="pl-k">=</span> <span class="pl-c1">Uri</span>.<span class="pl-en">encodeQueryComponent</span>(<span class="pl-s">r'mediaEntry[name]'</span>);
      <span class="pl-k">var</span> _formDesription <span class="pl-k">=</span>
          <span class="pl-c1">Uri</span>.<span class="pl-en">encodeQueryComponent</span>(<span class="pl-s">r'mediaEntry[description]'</span>);
      <span class="pl-k">var</span> _formTags <span class="pl-k">=</span> <span class="pl-c1">Uri</span>.<span class="pl-en">encodeQueryComponent</span>(<span class="pl-s">r'mediaEntry[tags]'</span>);
      <span class="pl-k">var</span> _formCatagory <span class="pl-k">=</span> <span class="pl-c1">Uri</span>.<span class="pl-en">encodeQueryComponent</span>(<span class="pl-s">r'mediaEntry[categories]'</span>);
      <span class="pl-k">var</span> _formType <span class="pl-k">=</span> <span class="pl-c1">Uri</span>.<span class="pl-en">encodeQueryComponent</span>(<span class="pl-s">r'mediaEntry[mediaType]'</span>);
      <span class="pl-c1">String</span> _request <span class="pl-k">=</span>
          <span class="pl-s">'https://www.kaltura.com/api_v3/service/media/action/addFromUploadedFile?ks=$<span class="pl-v">_ks</span>&amp;format=1&amp;$<span class="pl-v">_formTags</span>=<span class="pl-s">${<span class="pl-v">globals</span>.<span class="pl-v">userCompanyID</span>}</span>&amp;$<span class="pl-v">_formName</span>=$<span class="pl-v">_name</span>&amp;$<span class="pl-v">_formDesription</span>=$<span class="pl-v">_description</span>&amp;uploadTokenId=$<span class="pl-v">_token</span>&amp;$<span class="pl-v">_formCatagory</span>=Unapproved&amp;$<span class="pl-v">_formType</span>=1'</span>;
      <span class="pl-en">print</span>(_request);
      <span class="pl-k">await</span> http.<span class="pl-en">get</span>(_request).<span class="pl-en">then</span>((response) {
        <span class="pl-en">print</span>(<span class="pl-s">'Updated Info...<span class="pl-cce">\n</span>'</span> <span class="pl-k">+</span> response.body.<span class="pl-en">toString</span>());
        <span class="pl-c1">Map</span>&lt;<span class="pl-c1">String</span>, <span class="pl-c1">dynamic</span>&gt; _json <span class="pl-k">=</span> json.<span class="pl-en">decode</span>(response.body);
        <span class="pl-c">//  Verify Upload</span>
         _scaffoldKey.currentState.<span class="pl-en">hideCurrentSnackBar</span>();
        globals.videoID <span class="pl-k">=</span> <span class="pl-s">""</span> <span class="pl-k">+</span> _json[<span class="pl-s">"id"</span>].<span class="pl-en">toString</span>();
        <span class="pl-c1">Navigator</span>.<span class="pl-en">pop</span>(context);
      });
    }
  }

  <span class="pl-c1">Future</span> <span class="pl-en">uploadFile</span>(<span class="pl-c1">String</span> url, <span class="pl-c1">File</span> file, <span class="pl-c1">String</span> name) <span class="pl-k">async</span> {
      <span class="pl-k">var</span> stream <span class="pl-k">=</span>
          <span class="pl-k">new</span> http.<span class="pl-c1">ByteStream</span>(<span class="pl-c1">DelegatingStream</span>.<span class="pl-en">typed</span>(file.<span class="pl-en">openRead</span>()));
      <span class="pl-k">var</span> length <span class="pl-k">=</span> <span class="pl-k">await</span> file.<span class="pl-en">length</span>();
      <span class="pl-k">var</span> uri <span class="pl-k">=</span> <span class="pl-c1">Uri</span>.<span class="pl-en">parse</span>(url);
      <span class="pl-k">var</span> request <span class="pl-k">=</span> <span class="pl-k">new</span> http.<span class="pl-c1">MultipartRequest</span>(<span class="pl-s">"POST"</span>, uri);
      <span class="pl-k">var</span> multipartFile <span class="pl-k">=</span> <span class="pl-k">new</span> http.<span class="pl-c1">MultipartFile</span>(name, stream, length,
          filename<span class="pl-k">:</span> <span class="pl-en">basename</span>(file.path));
      request.files.<span class="pl-en">add</span>(multipartFile);
      <span class="pl-k">var</span> response <span class="pl-k">=</span> <span class="pl-k">await</span> request.<span class="pl-en">send</span>();
      <span class="pl-en">print</span>(response.statusCode);
      response.stream.<span class="pl-en">transform</span>(utf8.decoder).<span class="pl-en">listen</span>((value) {
        <span class="pl-en">print</span>(value);
      });
  }

  <span class="pl-k">void</span> <span class="pl-en">_uploadVideo</span>(<span class="pl-c1">BuildContext</span> context) <span class="pl-k">async</span> {
    <span class="pl-k">final</span> snackbar <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">SnackBar</span>(
      duration<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Duration</span>(seconds<span class="pl-k">:</span> <span class="pl-c1">20</span>),
      content<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Row</span>(
        children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
          <span class="pl-k">new</span> <span class="pl-c1">CircularProgressIndicator</span>(),
          <span class="pl-k">new</span> <span class="pl-c1">Text</span>(<span class="pl-s">"  Uploading..."</span>)
        ],
      ),
    );
    _scaffoldKey.currentState.<span class="pl-en">showSnackBar</span>(snackbar);
    <span class="pl-k">await</span> <span class="pl-en">uploadVideo</span>(context, _uploadFile, _nameController.text.<span class="pl-en">toString</span>(),
        _descController.text.<span class="pl-en">toString</span>());
    _scaffoldKey.currentState.<span class="pl-en">hideCurrentSnackBar</span>();
    <span class="pl-c">//  Navigator.pop(context);</span>
  }

  <span class="pl-k">void</span> <span class="pl-en">handelTextChange</span>(<span class="pl-c1">String</span> value) {
    <span class="pl-en">setState</span>(() {});
  }

  <span class="pl-k">final</span> <span class="pl-c1">TextEditingController</span> _nameController <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">TextEditingController</span>();
  <span class="pl-k">final</span> <span class="pl-c1">TextEditingController</span> _descController <span class="pl-k">=</span> <span class="pl-k">new</span> <span class="pl-c1">TextEditingController</span>();
  <span class="pl-k">@override</span>
  <span class="pl-c1">Widget</span> <span class="pl-en">build</span>(<span class="pl-c1">BuildContext</span> context) {
    <span class="pl-k">return</span> <span class="pl-c1">Scaffold</span>(
      key<span class="pl-k">:</span> _scaffoldKey,
      appBar<span class="pl-k">:</span> <span class="pl-c1">AppBar</span>(
        title<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">Text</span>(<span class="pl-s">'Video Upload'</span>),
        backgroundColor<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.white,
        actions<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
          <span class="pl-k">new</span> <span class="pl-c1">IconButton</span>(
            icon<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(
              <span class="pl-c1">Icons</span>.help,
            ),
            onPressed<span class="pl-k">:</span> () {
              globals.<span class="pl-c1">Utility</span>.<span class="pl-en">showAlertPopup</span>(context, <span class="pl-s">'Info'</span>,
                  <span class="pl-s">"Please Record in Landscape Mode for Best Results.<span class="pl-cce">\n\n</span>For Higher Quality Videos and to Prevent Data Loss, Capture and Edit a Video in the Camera App then Select the Video Here.<span class="pl-cce">\n\n</span>Once the Video is Uploaded it will be Avaliable in the 'Videos' Section After it Completes Processing."</span>);
            },
          ),
          <span class="pl-k">new</span> <span class="pl-c1">IconButton</span>(
              icon<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(<span class="pl-c1">Icons</span>.file_upload),
              onPressed<span class="pl-k">:</span> () {
                <span class="pl-k">if</span> (_nameController.text.<span class="pl-en">toString</span>().isNotEmpty <span class="pl-k">&amp;&amp;</span>
                    _descController.text.<span class="pl-en">toString</span>().isNotEmpty) {
                  <span class="pl-en">_uploadVideo</span>(context);
                } <span class="pl-k">else</span> {
                  globals.<span class="pl-c1">Utility</span>.<span class="pl-en">showAlertPopup</span>(
                      context, <span class="pl-s">"Info"</span>, <span class="pl-s">"Name and Description Required!"</span>);
                }
              })
        ],
      ),
      body<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">SingleChildScrollView</span>(
        child<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">ListBody</span>(
          children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
            <span class="pl-k">new</span> <span class="pl-c1">ListTile</span>(
              title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TextField</span>(
                controller<span class="pl-k">:</span> _nameController,
                onChanged<span class="pl-k">:</span> handelTextChange,
                decoration<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">InputDecoration</span>(
                  hintText<span class="pl-k">:</span> <span class="pl-s">"Name"</span>,
                ),
              ),
              trailing<span class="pl-k">:</span> _nameController.text.<span class="pl-en">toString</span>().isEmpty
                  <span class="pl-k">?</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(
                      <span class="pl-c1">Icons</span>.error,
                      color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.red,
                    )
                  <span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(
                      <span class="pl-c1">Icons</span>.check_circle,
                      color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.green,
                    ),
            ),
            <span class="pl-k">new</span> <span class="pl-c1">ListTile</span>(
              title<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">TextField</span>(
                controller<span class="pl-k">:</span> _descController,
                onChanged<span class="pl-k">:</span> handelTextChange,
                decoration<span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">InputDecoration</span>(
                  hintText<span class="pl-k">:</span> <span class="pl-s">"Description"</span>,
                ),
              ),
              trailing<span class="pl-k">:</span> _descController.text.<span class="pl-en">toString</span>().isEmpty
                  <span class="pl-k">?</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(
                      <span class="pl-c1">Icons</span>.error,
                      color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.red,
                    )
                  <span class="pl-k">:</span> <span class="pl-k">new</span> <span class="pl-c1">Icon</span>(
                      <span class="pl-c1">Icons</span>.check_circle,
                      color<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.green,
                    ),
            ),
            <span class="pl-k">new</span> <span class="pl-c1">Container</span>(
              height<span class="pl-k">:</span> <span class="pl-c1">20.0</span>,
            ),
            <span class="pl-k">new</span> <span class="pl-c1">Center</span>(
              child<span class="pl-k">:</span> <span class="pl-en">_previewVideo</span>(_controller),
            )
          ],
        ),
      ),
      floatingActionButton<span class="pl-k">:</span> <span class="pl-c1">Column</span>(
        mainAxisAlignment<span class="pl-k">:</span> <span class="pl-c1">MainAxisAlignment</span>.end,
        children<span class="pl-k">:</span> <span class="pl-k">&lt;</span><span class="pl-c1">Widget</span><span class="pl-k">&gt;</span>[
          <span class="pl-c1">Padding</span>(
            padding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">only</span>(top<span class="pl-k">:</span> <span class="pl-c1">16.0</span>),
            child<span class="pl-k">:</span> <span class="pl-c1">FloatingActionButton</span>(
              backgroundColor<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.red,
              onPressed<span class="pl-k">:</span> () {
                <span class="pl-en">_onImageButtonPressed</span>(<span class="pl-c1">ImageSource</span>.gallery);
              },
              heroTag<span class="pl-k">:</span> <span class="pl-s">'video0'</span>,
              tooltip<span class="pl-k">:</span> <span class="pl-s">'Pick Video from gallery'</span>,
              child<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">Icon</span>(<span class="pl-c1">Icons</span>.video_library),
            ),
          ),
          <span class="pl-c1">Padding</span>(
            padding<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">EdgeInsets</span>.<span class="pl-en">only</span>(top<span class="pl-k">:</span> <span class="pl-c1">16.0</span>),
            child<span class="pl-k">:</span> <span class="pl-c1">FloatingActionButton</span>(
              backgroundColor<span class="pl-k">:</span> <span class="pl-c1">Colors</span>.red,
              onPressed<span class="pl-k">:</span> () {
                <span class="pl-en">_onImageButtonPressed</span>(<span class="pl-c1">ImageSource</span>.camera);
              },
              heroTag<span class="pl-k">:</span> <span class="pl-s">'video1'</span>,
              tooltip<span class="pl-k">:</span> <span class="pl-s">'Take a Video'</span>,
              child<span class="pl-k">:</span> <span class="pl-k">const</span> <span class="pl-c1">Icon</span>(<span class="pl-c1">Icons</span>.videocam),
            ),
          ),
        ],
      ),
    );
  }
}
</pre></div>
<h2 dir="auto">Logs</h2>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content=""><pre class="notranslate"><code class="notranslate"></code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Analyzing /Users/rodydavis/Documents/Github/MyUnifyVideo...
  hint • Unused import: 'package:Unify_Mobile/menu/videodetails.dart' at package:Unify_Mobile/camera.dart:15:8 • unused_import
  hint • Unused import: 'package:dio/dio.dart' at package:Unify_Mobile/camera.dart:16:8 • unused_import
  hint • The value of the field '_mediaFile' isn't used at package:Unify_Mobile/camera.dart:26:16 • unused_field
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:3:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:58:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:85:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:116:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:163:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:287:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:462:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:3:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:58:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:85:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:116:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:163:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:237:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:412:7 • must_be_immutable
  hint • Duplicate import at package:Unify_Mobile/main.dart:5:8 • duplicate_import
  hint • Unused import: 'package:Unify_Mobile/menu/myaccount.dart' at package:Unify_Mobile/menu/contactsleads.dart:6:8 • unused_import
  hint • Unused import: 'package:material_search/material_search.dart' at package:Unify_Mobile/menu/contactsleads.dart:8:8 • unused_import
  hint • Unused import: 'package:flutter/scheduler.dart' at package:Unify_Mobile/menu/contactsleads.dart:9:8 • unused_import
  hint • Unused import: 'dart:convert' at package:Unify_Mobile/menu/help.dart:1:8 • unused_import
  hint • Unused import: 'package:flutter/rendering.dart' at package:Unify_Mobile/menu/help.dart:3:8 • unused_import
  hint • Unused import: 'dart:async' at package:Unify_Mobile/menu/help.dart:6:8 • unused_import
  hint • Unused import: 'dart:io' at package:Unify_Mobile/menu/help.dart:8:8 • unused_import
  hint • The method '_readAndroidBuildData' isn't used at package:Unify_Mobile/menu/help.dart:67:24 • unused_element
  hint • The method '_readIosDeviceInfo' isn't used at package:Unify_Mobile/menu/help.dart:97:24 • unused_element
  hint • Unused import: 'dart:convert' at package:Unify_Mobile/menu/settings.dart:1:8 • unused_import
  hint • Unused import: 'package:flutter/rendering.dart' at package:Unify_Mobile/menu/settings.dart:3:8 • unused_import
  hint • Unused import: 'package:Unify_Mobile/globals.dart' at package:Unify_Mobile/menu/settings.dart:4:8 • unused_import
  hint • Unused import: 'package:device_info/device_info.dart' at package:Unify_Mobile/menu/settings.dart:5:8 • unused_import
  hint • Unused import: 'dart:async' at package:Unify_Mobile/menu/settings.dart:6:8 • unused_import
  hint • Unused import: 'package:flutter/services.dart' at package:Unify_Mobile/menu/settings.dart:7:8 • unused_import
  hint • Unused import: 'package:Unify_Mobile/menu/myaccount.dart' at package:Unify_Mobile/menu/tabs.dart:6:8 • unused_import
  hint • Unused import: 'dart:io' at package:Unify_Mobile/menu/tabs.dart:11:8 • unused_import
  hint • The top level variable '_companyImageURL' isn't used at package:Unify_Mobile/menu/tabs.dart:31:14 • unused_element
  hint • The value of the field '_drawerContentsOpacity' isn't used at package:Unify_Mobile/menu/tabs.dart:38:21 • unused_field
  hint • The value of the field '_drawerDetailsPosition' isn't used at package:Unify_Mobile/menu/tabs.dart:40:21 • unused_field
  hint • The value of the field '_showDrawerContents' isn't used at package:Unify_Mobile/menu/tabs.dart:41:8 • unused_field
  hint • The method '_backIcon' isn't used at package:Unify_Mobile/menu/tabs.dart:104:12 • unused_element
  hint • The value of the field '_drawerContents' isn't used at package:Unify_Mobile/menu/tabs.dart:131:29 • unused_field
  hint • The value of the field '_drawerContentsIcons' isn't used at package:Unify_Mobile/menu/tabs.dart:136:29 • unused_field
  hint • The value of the local variable 'index' isn't used at package:Unify_Mobile/menu/tabs/archivedvideos.dart:99:9 • unused_local_variable
  hint • The value of the local variable 'index' isn't used at package:Unify_Mobile/menu/tabs/myvideos.dart:87:9 • unused_local_variable
  hint • The value of the local variable 'index' isn't used at package:Unify_Mobile/menu/tabs/sharedvideos.dart:99:9 • unused_local_variable
  hint • Unused import: 'package:flutter_webview_plugin/flutter_webview_plugin.dart' at package:Unify_Mobile/menu/videodetails.dart:7:8 • unused_import
  hint • The value of the local variable 'ccToggleBool' isn't used at package:Unify_Mobile/menu/videodetails.dart:443:12 • unused_local_variable
  hint • Unused import: 'package:device_info/device_info.dart' at package:Unify_Mobile/signin/forgot.dart:5:8 • unused_import
  hint • Unused import: 'package:flutter/services.dart' at package:Unify_Mobile/signin/forgot.dart:7:8 • unused_import
  hint • Unused import: 'package:get_version/get_version.dart' at package:Unify_Mobile/signin/forgot.dart:9:8 • unused_import
  hint • The value of the field '_controllerUsername' isn't used at package:Unify_Mobile/signin/forgot.dart:19:31 • unused_field
  hint • The value of the field '_controllerDomain' isn't used at package:Unify_Mobile/signin/forgot.dart:20:31 • unused_field
  hint • The value of the field '_scaffoldKey' isn't used at package:Unify_Mobile/signin/forgot.dart:22:9 • unused_field
  hint • Unused import: 'package:Unify_Mobile/menu/tabs.dart' at package:Unify_Mobile/signin/signin.dart:6:8 • unused_import
54 issues found.
(Ran in 7.4s)"><pre class="notranslate"><code class="notranslate">Analyzing /Users/rodydavis/Documents/Github/MyUnifyVideo...
  hint • Unused import: 'package:Unify_Mobile/menu/videodetails.dart' at package:Unify_Mobile/camera.dart:15:8 • unused_import
  hint • Unused import: 'package:dio/dio.dart' at package:Unify_Mobile/camera.dart:16:8 • unused_import
  hint • The value of the field '_mediaFile' isn't used at package:Unify_Mobile/camera.dart:26:16 • unused_field
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:3:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:58:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:85:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:116:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:163:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:287:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom/custom_widgets.dart:462:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:3:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:58:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:85:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:116:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:163:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:237:7 • must_be_immutable
  hint • This class inherits from a class marked as @immutable, and therefore should be immutable (all instance fields must be final) at package:Unify_Mobile/custom_widgets.dart:412:7 • must_be_immutable
  hint • Duplicate import at package:Unify_Mobile/main.dart:5:8 • duplicate_import
  hint • Unused import: 'package:Unify_Mobile/menu/myaccount.dart' at package:Unify_Mobile/menu/contactsleads.dart:6:8 • unused_import
  hint • Unused import: 'package:material_search/material_search.dart' at package:Unify_Mobile/menu/contactsleads.dart:8:8 • unused_import
  hint • Unused import: 'package:flutter/scheduler.dart' at package:Unify_Mobile/menu/contactsleads.dart:9:8 • unused_import
  hint • Unused import: 'dart:convert' at package:Unify_Mobile/menu/help.dart:1:8 • unused_import
  hint • Unused import: 'package:flutter/rendering.dart' at package:Unify_Mobile/menu/help.dart:3:8 • unused_import
  hint • Unused import: 'dart:async' at package:Unify_Mobile/menu/help.dart:6:8 • unused_import
  hint • Unused import: 'dart:io' at package:Unify_Mobile/menu/help.dart:8:8 • unused_import
  hint • The method '_readAndroidBuildData' isn't used at package:Unify_Mobile/menu/help.dart:67:24 • unused_element
  hint • The method '_readIosDeviceInfo' isn't used at package:Unify_Mobile/menu/help.dart:97:24 • unused_element
  hint • Unused import: 'dart:convert' at package:Unify_Mobile/menu/settings.dart:1:8 • unused_import
  hint • Unused import: 'package:flutter/rendering.dart' at package:Unify_Mobile/menu/settings.dart:3:8 • unused_import
  hint • Unused import: 'package:Unify_Mobile/globals.dart' at package:Unify_Mobile/menu/settings.dart:4:8 • unused_import
  hint • Unused import: 'package:device_info/device_info.dart' at package:Unify_Mobile/menu/settings.dart:5:8 • unused_import
  hint • Unused import: 'dart:async' at package:Unify_Mobile/menu/settings.dart:6:8 • unused_import
  hint • Unused import: 'package:flutter/services.dart' at package:Unify_Mobile/menu/settings.dart:7:8 • unused_import
  hint • Unused import: 'package:Unify_Mobile/menu/myaccount.dart' at package:Unify_Mobile/menu/tabs.dart:6:8 • unused_import
  hint • Unused import: 'dart:io' at package:Unify_Mobile/menu/tabs.dart:11:8 • unused_import
  hint • The top level variable '_companyImageURL' isn't used at package:Unify_Mobile/menu/tabs.dart:31:14 • unused_element
  hint • The value of the field '_drawerContentsOpacity' isn't used at package:Unify_Mobile/menu/tabs.dart:38:21 • unused_field
  hint • The value of the field '_drawerDetailsPosition' isn't used at package:Unify_Mobile/menu/tabs.dart:40:21 • unused_field
  hint • The value of the field '_showDrawerContents' isn't used at package:Unify_Mobile/menu/tabs.dart:41:8 • unused_field
  hint • The method '_backIcon' isn't used at package:Unify_Mobile/menu/tabs.dart:104:12 • unused_element
  hint • The value of the field '_drawerContents' isn't used at package:Unify_Mobile/menu/tabs.dart:131:29 • unused_field
  hint • The value of the field '_drawerContentsIcons' isn't used at package:Unify_Mobile/menu/tabs.dart:136:29 • unused_field
  hint • The value of the local variable 'index' isn't used at package:Unify_Mobile/menu/tabs/archivedvideos.dart:99:9 • unused_local_variable
  hint • The value of the local variable 'index' isn't used at package:Unify_Mobile/menu/tabs/myvideos.dart:87:9 • unused_local_variable
  hint • The value of the local variable 'index' isn't used at package:Unify_Mobile/menu/tabs/sharedvideos.dart:99:9 • unused_local_variable
  hint • Unused import: 'package:flutter_webview_plugin/flutter_webview_plugin.dart' at package:Unify_Mobile/menu/videodetails.dart:7:8 • unused_import
  hint • The value of the local variable 'ccToggleBool' isn't used at package:Unify_Mobile/menu/videodetails.dart:443:12 • unused_local_variable
  hint • Unused import: 'package:device_info/device_info.dart' at package:Unify_Mobile/signin/forgot.dart:5:8 • unused_import
  hint • Unused import: 'package:flutter/services.dart' at package:Unify_Mobile/signin/forgot.dart:7:8 • unused_import
  hint • Unused import: 'package:get_version/get_version.dart' at package:Unify_Mobile/signin/forgot.dart:9:8 • unused_import
  hint • The value of the field '_controllerUsername' isn't used at package:Unify_Mobile/signin/forgot.dart:19:31 • unused_field
  hint • The value of the field '_controllerDomain' isn't used at package:Unify_Mobile/signin/forgot.dart:20:31 • unused_field
  hint • The value of the field '_scaffoldKey' isn't used at package:Unify_Mobile/signin/forgot.dart:22:9 • unused_field
  hint • Unused import: 'package:Unify_Mobile/menu/tabs.dart' at package:Unify_Mobile/signin/signin.dart:6:8 • unused_import
54 issues found.
(Ran in 7.4s)
</code></pre></div>

<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (Channel beta, v0.3.2, on Mac OS X 10.13.4 17E199, locale en-US)
    • Flutter version 0.3.2 at /Users/rodydavis/Android/flutter/flutter
    • Framework revision 44b7e7d3f4 (4 weeks ago), 2018-04-20 01:02:44 -0700
    • Engine revision 09d05a3891
    • Dart version 2.0.0-dev.48.0.flutter-fe606f890b

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/rodydavis/Library/Android/sdk
    • Android NDK at /Users/rodydavis/Library/Android/sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • 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-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.3, Build version 9E145
    • ios-deploy 1.9.2
    • CocoaPods version 1.4.0

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 24.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.23.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.12.1

[✓] Connected devices (3 available)
    • Rody’s 📱     • 68cab38f1e7de5b8aece2a1ebb7ca9a5d4761e19 • ios • iOS 11.3.1
    • Dev-iPhone-6s • a75015aff2fbecb29dcc8e459b14cba86c08f7fe • ios • iOS 11.3.1
    •               • 90288c0d9ae73afb8a84663c0475d208744fc569 • ios • iOS

• No issues found!"><pre class="notranslate"><code class="notranslate">[✓] Flutter (Channel beta, v0.3.2, on Mac OS X 10.13.4 17E199, locale en-US)
    • Flutter version 0.3.2 at /Users/rodydavis/Android/flutter/flutter
    • Framework revision 44b7e7d3f4 (4 weeks ago), 2018-04-20 01:02:44 -0700
    • Engine revision 09d05a3891
    • Dart version 2.0.0-dev.48.0.flutter-fe606f890b

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
    • Android SDK at /Users/rodydavis/Library/Android/sdk
    • Android NDK at /Users/rodydavis/Library/Android/sdk/ndk-bundle
    • Platform android-27, build-tools 27.0.3
    • 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-1024-b01)
    • All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.3)
    • Xcode at /Applications/Xcode.app/Contents/Developer
    • Xcode 9.3, Build version 9E145
    • ios-deploy 1.9.2
    • CocoaPods version 1.4.0

[✓] Android Studio (version 3.1)
    • Android Studio at /Applications/Android Studio.app/Contents
    • Flutter plugin version 24.0.1
    • Dart plugin version 173.4700
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[✓] VS Code (version 1.23.1)
    • VS Code at /Applications/Visual Studio Code.app/Contents
    • Dart Code extension version 2.12.1

[✓] Connected devices (3 available)
    • Rody’s 📱     • 68cab38f1e7de5b8aece2a1ebb7ca9a5d4761e19 • ios • iOS 11.3.1
    • Dev-iPhone-6s • a75015aff2fbecb29dcc8e459b14cba86c08f7fe • ios • iOS 11.3.1
    •               • 90288c0d9ae73afb8a84663c0475d208744fc569 • ios • iOS

• No issues found!
</code></pre></div>
<h2 dir="auto">Steps to Reproduce</h2>
<p dir="auto">When building a new flutter project in IntelliJ, company domain cookytech.in<br>
-&gt; entered as <code class="notranslate"> `in`.cookytech.mnshi</code> will throw compiler errors because XML files will get the <code class="notranslate">`in`</code> part with the graves,<br>
-&gt; entered as in.cookytech.mnshi will throw compiler errors because 'in' is a keyword in dart, kotlin, and java</p>
<h2 dir="auto">Current Solution</h2>
<p dir="auto">enter in.cookytech as company domain, and then manually add graves in kotlin files. This will allow for compilation.</p>
<h2 dir="auto">Logs</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
e: /home/raveesh/MyCode/Code/Training/Flutter/mnshi/android/app/src/main/kotlin/in/cookytech/mnshi/MainActivity.kt: (1, 9): Package name must be a '.'-separated identifier list

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
&gt; Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Finished with error: Gradle build failed: 1"><pre lang="Launching" class="notranslate"><code class="notranslate">Initializing gradle...
Resolving dependencies...
Running 'gradlew assembleDebug'...
e: /home/raveesh/MyCode/Code/Training/Flutter/mnshi/android/app/src/main/kotlin/in/cookytech/mnshi/MainActivity.kt: (1, 9): Package name must be a '.'-separated identifier list

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:compileDebugKotlin'.
&gt; Compilation error. See log for more details

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Finished with error: Gradle build failed: 1
</code></pre></div>
<h2 dir="auto">Flutter Doctor</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="[✓] Flutter (on Linux, locale en_IN, channel alpha)
    • Flutter at /home/raveesh/MyCode/Flutter/flutter
    • Framework revision 8f65fec5f5 (6 days ago), 2017-12-12 09:50:14 -0800
    • Engine revision edaecdc8b8
    • Tools Dart version 1.25.0-dev.11.0
    • Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
    • Android SDK at /home/raveesh/MyCode/Android/SDK
    • Android NDK at /home/raveesh/MyCode/Android/SDK/ndk-bundle
    • Platform android-27, build-tools 27.0.2
    • Java binary at: /usr/local/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Android Studio (version 3.0)
    • Android Studio at /usr/local/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.3)
    • Flutter plugin version 20.0.3
    • Dart plugin version 173.3942.31

[✓] Connected devices
    • Lenovo K33a42 • 9b8bcc9f • android-arm • Android 7.1.2 (API 25)"><pre class="notranslate"><code class="notranslate">[✓] Flutter (on Linux, locale en_IN, channel alpha)
    • Flutter at /home/raveesh/MyCode/Flutter/flutter
    • Framework revision 8f65fec5f5 (6 days ago), 2017-12-12 09:50:14 -0800
    • Engine revision edaecdc8b8
    • Tools Dart version 1.25.0-dev.11.0
    • Engine Dart version 2.0.0-edge.d8ae797298c3a6cf8dc9f4558707bd2672224d3e

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.2)
    • Android SDK at /home/raveesh/MyCode/Android/SDK
    • Android NDK at /home/raveesh/MyCode/Android/SDK/ndk-bundle
    • Platform android-27, build-tools 27.0.2
    • Java binary at: /usr/local/android-studio/jre/bin/java
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] Android Studio (version 3.0)
    • Android Studio at /usr/local/android-studio
    • Java version OpenJDK Runtime Environment (build 1.8.0_152-release-915-b01)

[✓] IntelliJ IDEA Ultimate Edition (version 2017.3)
    • Flutter plugin version 20.0.3
    • Dart plugin version 173.3942.31

[✓] Connected devices
    • Lenovo K33a42 • 9b8bcc9f • android-arm • Android 7.1.2 (API 25)
</code></pre></div>
<h2 dir="auto">Using:</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="IntelliJ IDEA 2017.3.1 (Ultimate Edition)
Build #IU-173.3942.27, built on December 11, 2017
Licensed to Raveesh Agarwal
Subscription is active until May 28, 2018
For educational use only.
JRE: 1.8.0_152-release-1024-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.10.0-42-generic"><pre class="notranslate"><code class="notranslate">IntelliJ IDEA 2017.3.1 (Ultimate Edition)
Build #IU-173.3942.27, built on December 11, 2017
Licensed to Raveesh Agarwal
Subscription is active until May 28, 2018
For educational use only.
JRE: 1.8.0_152-release-1024-b8 amd64
JVM: OpenJDK 64-Bit Server VM by JetBrains s.r.o
Linux 4.10.0-42-generic
</code></pre></div>