aves_mio/.flutter/packages/flutter/test/painting/no_op_codec.dart
Fabio Micheluz 2c988f959b
Some checks are pending
Quality check / Flutter analysis (push) Waiting to run
Quality check / CodeQL analysis (java-kotlin) (push) Waiting to run
first commit
2026-02-19 13:25:23 +01:00

34 lines
901 B
Dart

// Copyright 2014 The Flutter Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
/// @docImport 'package:flutter/painting.dart';
library;
import 'dart:ui';
/// Returns a [Codec] that throws on all member invocations.
Codec createNoOpCodec() => _NoOpCodec();
/// Function matching [DecoderBufferCallback] which returns a [Codec]
/// that throws on all member invocations.
Future<Codec> noOpDecoderBufferCallback(
ImmutableBuffer buffer, {
int? cacheWidth,
int? cacheHeight,
bool? allowUpscaling,
}) async => _NoOpCodec();
class _NoOpCodec implements Codec {
@override
void dispose() {}
@override
int get frameCount => throw UnimplementedError();
@override
Future<FrameInfo> getNextFrame() => throw UnimplementedError();
@override
int get repetitionCount => throw UnimplementedError();
}