Line data Source code
1 : // Licensed under the Apache License, Version 2.0
2 : // Copyright 2025, Michael Bushe, All rights reserved.
3 :
4 : part of 'meter.dart';
5 :
6 : /// Factory for creating Meter instances.
7 : ///
8 : /// This factory class provides a static create method for constructing
9 : /// properly configured Meter instances. It follows the factory pattern
10 : /// to separate the construction logic from the Meter class itself.
11 : class MeterCreate {
12 : /// Creates a new Meter with the specified delegate and provider.
13 : ///
14 : /// @param delegate The API Meter implementation to delegate to
15 : /// @param provider The MeterProvider that created this Meter
16 : /// @return A new Meter instance
17 20 : static Meter create({
18 : required APIMeter delegate,
19 : required MeterProvider provider,
20 : }) {
21 20 : return Meter._(
22 : delegate: delegate,
23 : provider: provider,
24 : );
25 : }
26 : }
|