# getOrder method

int getOrder(

1. Object? obj,
2. OrderSourceProvider? provider

)

Resolves the order value of the given object.

This method attempts to determine the order value through multiple strategies:

1. Direct inspection if the object implements Ordered
2. Using the provided `provider` for indirect order resolution
3. Fallback to default ordering behavior

### Parameters:

- `obj`: The object to resolve order for
- `provider`: Optional order source provider for indirect resolution

### Returns:

The resolved order value as an integer

### Resolution Process:

1. If a provider is given, use it to find order sources
2. If multiple sources are found (Iterable), use the first valid one
3. Fall back to direct order inspection
4. Default to Ordered.LOWEST_PRECEDENCE if no order information found

## Implementation

    int getOrder(Object? obj, OrderSourceProvider? provider) {
      int? order;
      if (obj != null && provider != null) {
        final source = provider.getOrderSource(obj);
        if (source != null) {
          if (source is Iterable) {
            for (final s in source) {
              order = doGetOrder(s);
              if (order != null) break;
            }
          } else {
            order = doGetOrder(source);
          }
        }
      }
      return order ?? doGet(obj);
    }