Skip to content

Instantly share code, notes, and snippets.

import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
const platform = const MethodChannel('duosdk.microsoft.dev');
void main() => runApp(MyApp());
class MyApp extends StatelessWidget {
// This widget is the root of your application.
@override
package com.example.duo_starter
import androidx.annotation.NonNull;
import io.flutter.embedding.android.FlutterActivity
import io.flutter.embedding.engine.FlutterEngine
import io.flutter.plugins.GeneratedPluginRegistrant
import io.flutter.plugin.common.MethodChannel
import com.microsoft.device.display.DisplayMask
SliverGrid(
gridDelegate: SliverGridDelegateWithFixedCrossAxisCount(
// this needs to work with the control, should be able to get the size of the display we are on, not the whole device.
crossAxisCount: ((MediaQuery.of(context).size.width > 540 ? 540 : MediaQuery.of(context).size.width) / 200).round(),
),
delegate: SliverChildBuilderDelegate((BuildContext context, int index) {
return CastTile(castMember: currentCast[index]);
},
childCount: currentCast == null ? 0 : currentCast.length,
),